php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13267 segfault with parent::
Submitted: 2001-09-12 13:01 UTC Modified: 2001-09-12 14:34 UTC
From: carl at thep dot lu dot se Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.6 OS: linux
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: carl at thep dot lu dot se
New email:
PHP Version: OS:

 

 [2001-09-12 13:01 UTC] carl at thep dot lu dot se
PHP segfaults if parent:: is used in a class that is
defined in a file other than the file in which its base class
is defined.

Example code:
*** one.php ***
<?
class a
{
        function g()
        {
                echo "x\n";
        }
}
?>

*** two.php ***
<?
require("one.php");
class b extends a
{
        function f()
        {
                parent::g();
        }
}
header("content-type: text/plain");
b::f();                                                                                                                                  
?>

(gdb) bt
#0  0x40226874 in execute (op_array=0x8119ba4) at zend_execute.c:1426
#1  0x40226f96 in execute (op_array=0x81135e4) at zend_execute.c:1544
#2  0x40237eab in zend_execute_scripts (type=8, file_count=3) at zend.c:752
#3  0x4024f89c in php_execute_script (primary_file=0xbffff644) at main.c:1206
#4  0x4024b105 in apache_php_module_main (r=0x80fb1a4, display_source_mode=0) at sapi_apache.c:89
#5  0x4024be20 in send_php (r=0x80fb1a4, display_source_mode=0, filename=0x80fbd54 "/home/blixen/carl/apache/htdocs/test/two.php")
    at mod_php4.c:536
#6  0x4024be65 in send_parsed_php (r=0x80fb1a4) at mod_php4.c:547
#7  0x8054973 in ap_invoke_handler ()
#8  0x8068bab in process_request_internal ()
#9  0x8068c20 in ap_process_request ()
#10 0x805ff7d in child_main ()
#11 0x80601e7 in make_child ()
#12 0x806029b in startup_children ()
#13 0x806090d in standalone_main ()
#14 0x806113b in main ()
#15 0x400c7a8e in __libc_start_main (main=0x8060da0 <main>, argc=1, argv=0xbffff924, init=0x804eb28 <_init>, fini=0x8096c90 <_fini>,
    rtld_fini=0x4000aa50 <_dl_fini>, stack_end=0xbffff91c) at ../sysdeps/generic/libc-start.c:92            

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-12 14:34 UTC] mfischer@php.net
Cannot reproduce in latest CVS (but verified with 4.0.6).

- Markus
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu May 08 00:01:29 2025 UTC