php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26801 switch ($a{0}) crash
Submitted: 2004-01-05 16:58 UTC Modified: 2004-01-07 21:35 UTC
From: demeter at dcs dot fmph dot uniba dot sk Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5CVS OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: demeter at dcs dot fmph dot uniba dot sk
New email:
PHP Version: OS:

 

 [2004-01-05 16:58 UTC] 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;
    }
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-07 19:45 UTC] 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-07 21:35 UTC] sniper@php.net
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

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 06:01:29 2024 UTC