xref: /PHP-8.0/ext/hash/tests/bug81714.phpt (revision c2eafc29)
1--TEST--
2Bug #81714 (segfault when serializing finalized HashContext)
3--FILE--
4<?php
5$h = hash_init('md5');
6hash_final($h);
7try {
8    serialize($h);
9} catch (Exception $ex) {
10    var_dump($ex->getMessage());
11}
12?>
13--EXPECTF--
14string(52) "HashContext for algorithm "md5" cannot be serialized"
15