php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22284 Dynamic Var Accessing Classes crashes PHP --> #22237
Submitted: 2003-02-18 16:28 UTC Modified: 2003-02-23 01:06 UTC
From: White_Angel at gmx dot de Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5CVS-2003-02-21 (dev) OS: all
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: White_Angel at gmx dot de
New email:
PHP Version: OS:

 

 [2003-02-18 16:28 UTC] White_Angel at gmx dot de
On testing how to solve Bug #22269 I noticed the following:

class foo {
  var $a="dummyyy";

  function bar() {
     $name="a";
     echo $this->$name; or $this->$name;
  }
}

Will generate nen Segmetnation Vault if the $this->$name line is parsed.

If this Acces is depricated HOW CAN i access this Variable Now ? (class_get_vars is only reading)
Is this a Bug or a feature ?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-18 16:29 UTC] White_Angel at gmx dot de
ups.
 [2003-02-18 16:45 UTC] White_Angel at gmx dot de
Added:
Must be a Problem in the Syntax Check because
php -l in syntax check only crashes also.
 [2003-02-18 16:55 UTC] magnus@php.net
#0  0x0817d606 in zend_hash_exists (ht=0x401e3ce0, arKey=0x6c <Address 0x6c out of bounds>, 
    nKeyLength=1) at /php/php/php5/Zend/zend_hash.c:923
        tmp = 0x6c <Address 0x6c out of bounds>
        h = 1075731160
        nIndex = 8
        p = (struct bucket *) 0x1
#1  0x08167571 in zend_do_fetch_property (result=0xbfffbe90, object=0xbfffbd00, property=0xbfffc118)
    at /php/php/php5/Zend/zend_compile.c:2327
        le = (struct _zend_llist_element *) 0x401e5c28
        opline = {handler = 0x81e6c98 <alloc_globals+11448>, result = {op_type = 1075731304, 
    throw_list = 0x18, u = {constant = {value = {lval = 67, dval = 3.3102398271363518e-322, str = {
            val = 0x43 <Address 0x43 out of bounds>, len = 0}, ht = 0x43, obj = {handle = 67, 
            handlers = 0x0}}, refcount = 0, type = 8 '\b', is_ref = 188 '?'}, var = 67, 
      opline_num = 67, op_array = 0x43, jmp_addr = 0x43, EA = {var = 67, type = 0}}}, op1 = {
    op_type = 3, throw_list = 0x18, u = {constant = {value = {lval = 1075731304, 
          dval = -1.9834215645439262, str = {val = 0x401e5b68 "", len = -1073759208}, 
          ht = 0x401e5b68, obj = {handle = 1075731304, handlers = 0xbfffbc18}}, refcount = 135743298, 
        type = 140 '\214', is_ref = 91 '['}, var = 1075731304, opline_num = 1075731304, 
      op_array = 0x401e5b68, jmp_addr = 0x401e5b68, EA = {var = 1075731304, type = 3221208088}}}, 
  op2 = {op_type = 136113376, throw_list = 0x43, u = {constant = {value = {lval = 0, dval = 0, str = {
            val = 0x0, len = 0}, ht = 0x0, obj = {handle = 0, handlers = 0x0}}, refcount = 0, 
        type = 56 '8', is_ref = 188 '?'}, var = 0, opline_num = 0, op_array = 0x0, jmp_addr = 0x0, 
      EA = {var = 0, type = 0}}}, extended_value = 135689985, lineno = 136211908, opcode = 52 '4'}
        fetch_list_ptr = (struct _zend_llist *) 0x401e5b38
        opline_ptr = (struct _zend_op *) 0x401e5c30
#2  0x08158777 in zendparse () at /php/php/php5/Zend/zend_language_parser.y:811
        tmp_znode = {op_type = 4, throw_list = 0x0, u = {constant = {value = {lval = 72, 
        dval = 3.3951932691017084e-313, str = {val = 0x48 <Address 0x48 out of bounds>, len = 16}, 
        ht = 0x48, obj = {handle = 72, handlers = 0x10}}, refcount = 0, type = 0 '\0', 
      is_ref = 0 '\0'}, var = 72, opline_num = 72, op_array = 0x48, jmp_addr = 0x48, EA = {var = 72, 
      type = 16}}}
        zendchar = 59
        zendlval = {op_type = 1, throw_list = 0x0, u = {constant = {value = {lval = 1075731652, 
        dval = 9.0194652172583403e-314, str = {val = 0x401e5cc4 "name", len = 4}, ht = 0x401e5cc4, 
        obj = {handle = 1075731652, handlers = 0x4}}, refcount = 1, type = 1 '\001', 
      is_ref = 0 '\0'}, var = 1075731652, opline_num = 1075731652, op_array = 0x401e5cc4, 
    jmp_addr = 0x401e5cc4, EA = {var = 1075731652, type = 4}}}
and it goes on and on.
 [2003-02-18 22:48 UTC] sniper@php.net
must be ZE2 prob since the script just gives me parse error
with php4.3.2-dev

 [2003-02-22 05:37 UTC] peter at globalvision dot com dot au
Isn't this identical to my report? (22237)
 [2003-02-22 05:45 UTC] White_Angel at gmx dot de
Yes. It`s the same #22237 .

Sorry for double Report.
 [2003-02-23 01:06 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. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

Add any useful comments to bug #22237, thank you.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 16:01:27 2024 UTC