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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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: Thu Apr 25 04:01:38 2024 UTC