xref: /PHP-8.3/ext/xml/tests/bug73135.phpt (revision 6db4b972)
1--TEST--
2Bug #73135 (xml_parse() segmentation fault)
3--EXTENSIONS--
4xml
5--CREDITS--
6edgarsandi - <edgar.r.sandi@gmail.com>
7--FILE--
8<?php
9    function start_elem($parser, $xml) {
10        xml_parse($parser, $xml);
11    }
12
13    $xml = <<<HERE
14    <a xmlns="ahihi">
15        <bar foo="ahihi"/>
16    </a>
17HERE;
18
19    $parser = xml_parser_create_ns();
20    xml_set_element_handler($parser, 'start_elem', 'ahihi');
21    xml_parse($parser, $xml);
22?>
23--EXPECTF--
24Fatal error: Uncaught Error: Parser must not be called recursively in %s:%d
25Stack trace:
26%a
27