#26685 [NEW]: Doing a continue 0 within a switch is causing a seg fault

From: Date: Mon, 22 Dec 2003 00:17:39 +0000
Subject: #26685 [NEW]: Doing a continue 0 within a switch is causing a seg fault
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-52357@lists.php.net to get a copy of this message
From: sc1n at yahoo dot com Operating system: Gentoo Linux 2.6 Kernel PHP version: 4.3.4 PHP Bug Type: Reproducible crash Bug description: Doing a continue 0 within a switch is causing a seg fault Description: ------------ I used a terinary operator to do a continue 0 or continue 2 within a switch, and this caused PHP to seg fault... I am able to consitantly reproduce the bug. Reproduce code: --------------- while( $value_array = each($this->tags) ) { $key = $value_array[0]; $value = $value_array[1]; $value['tag_id'] = $key; switch($tag_pos_type) { case "start": continue $value[3] == 1 ? 2: 0; //The problem case "end": continue $value[3] == 0 ? 2: 0; //The problem } if( is_array($tag_type_array) ) { if( in_array($value[0], $tag_type_array) ) { return $value; } } else { return $value; } } Expected result: ---------------- To either continue not at all, or to continue 2 Actual result: -------------- segmentation fault -- Edit bug report at http://bugs.php.net/?id=26685&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26685&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26685&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26685&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26685&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26685&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26685&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26685&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26685&r=support Expected behavior: http://bugs.php.net/fix.php?id=26685&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26685&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26685&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26685&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26685&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26685&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26685&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26685&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26685&r=float

« previous php.bugs (#52357) next »