| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2004-09-28 20:46 UTC] sorin at intersol dot ro
 Description:
------------
Very basic use test of adodb generate a complete crash on 5.0.2 and 
last build PHP 5.1.0-dev (cli) (built: Sep 28 2004 16:26:27)
gives this:
Invalid opcode 137/1/8 in adodb-xmlschema.inc.php.
Runing php with -e parameters makes no difference.
Reproduce code:
---------------
	function _tag_close( &$parser, $tag ) {
>>		$this->currentElement = '';
		
		switch( strtoupper( $tag ) ) {
			case 'TABLE':
				$this->parent->addSQL( 
Expected result:
----------------
Anything but not a crash?!
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 12:00:01 2025 UTC | 
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 ?>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