ID: 30266 Updated by: [EMAIL PROTECTED] Reported By: sorin at intersol dot ro -Status: Assigned +Status: Closed Bug Type: Reproducible crash Operating System: * PHP Version: 5.0.3 Assigned To: helly New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2005-02-27 12:52:58] [EMAIL PROTECTED] Hartmut verified, Andi fix. :) ------------------------------------------------------------------------ [2005-02-11 00:07:11] [EMAIL PROTECTED] Reproduceable using array_walk as well: <?php class testc { var $b = "c"; function crash($val) { $this->b = $val; throw new Exception("ex"); } } $fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple"); $myobj = new testc(); function test_print ($item2, $key, $userd) { $userd->crash($item2); } array_walk ($fruits, 'test_print', $myobj); ?> comment out either line in the crash() method and it works fine otherwise: Invalid opcode when run under HEAD and segfault when run under 5_0 branch. same results as Hartmut's script ------------------------------------------------------------------------ [2005-02-06 01:37:41] [EMAIL PROTECTED] The following code gives me Fatal error: Invalid opcode 137/1/8. in /home/hartmut/tmp/PECL_Gen.test/pecl-gen on line 24 using latest CVS HEAD on Linux: <?php class XML_Parser { var $dummy = "a"; function parse($data) { $parser = xml_parser_create(); xml_set_object($parser, $this); xml_set_element_handler($parser, 'startHandler', 'endHandler'); xml_parse($parser, $data, true); xml_parser_free($parser); } function startHandler($XmlParser, $tag, $attr) { // commenting out either line prevents the crash $this->dummy = "b"; throw new Exception("ex"); } function endHandler($XmlParser, $tag) { } } $p1 = new Xml_Parser(); $p1->parse('<tag1><tag2></tag2></tag1>'); // this crashes # $p1->parse('<tag1></tag1>'); // this doesn't crash ?> ------------------------------------------------------------------------ [2004-12-06 01:00:10] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2004-11-28 14:35:33] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/30266 -- Edit this bug report at http://bugs.php.net/?id=30266&edit=1