#26801 [Ver->Bgs]: switch ($a{0}) crash

From: Date: Thu, 08 Jan 2004 02:35:20 +0000
Subject: #26801 [Ver->Bgs]: switch ($a{0}) crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-52963@lists.php.net to get a copy of this message
ID: 26801 Updated by: sniper@php.net Reported By: demeter at dcs dot fmph dot uniba dot sk -Status: Verified +Status: Bogus Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. See bug #26696 Previous Comments: ------------------------------------------------------------------------ [2004-01-07 19:45:56] sniper@php.net 0x0835814d in zend_pzval_unlock_func (z=0x1) at /usr/src/web/php/php5/Zend/zend_execute.c:64 64 z->refcount--; (gdb) bt #0 0x0835814d in zend_pzval_unlock_func (z=0x1) at /usr/src/web/php/php5/Zend/zend_execute.c:64 #1 0x0835866d in zend_switch_free (opline=0x40e48c40, Ts=0xbfffd740) at /usr/src/web/php/php5/Zend/zend_execute.c:202 #2 0x0835478a in zend_switch_free_handler (execute_data=0xbfffd7b0, op_array=0x40e48724) at /usr/src/web/php/php5/Zend/zend_execute.c:3076 #3 0x0834f18c in execute (op_array=0x40e48724) at /usr/src/web/php/php5/Zend/zend_execute.c:1264 #4 0x0832da5c in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/web/php/php5/Zend/zend.c:1050 #5 0x082ead64 in php_execute_script (primary_file=0xbffffbb0) at /usr/src/web/php/php5/main/main.c:1642 #6 0x0836742c in main (argc=2, argv=0xbffffc44) at /usr/src/web/php/php5/sapi/cli/php_cli.c:925 ------------------------------------------------------------------------ [2004-01-05 16:58:16] demeter at dcs dot fmph dot uniba dot sk Description: ------------ This code doesn't crash: <?php $a = 'aa'; $b = $a{0}; switch ($b) { case '-': break; } ?> In PHP5 Beta1 both samples run corectly. Reproduce code: --------------- <?php $a = 'aa'; switch ($a{0}) { case '-': break; } ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26801&edit=1

« previous php.bugs (#52963) next »