php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3354 segfault when calling exit from a constructor
Submitted: 2000-01-29 22:40 UTC Modified: 2000-02-01 23:50 UTC
From: rasmus@php.net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (29/01/2000) OS: Linux
Private report: No CVE-ID: None
 [2000-01-29 22:40 UTC] rasmus@php.net
Test script:
        class test {
                function test() {
                        exit;
                }
        }
        $a = new test();

Backtrace:
Program received signal SIGSEGV, Segmentation fault.
_mem_block_check (ptr=0x0, silent=1, __zend_filename=0x80d68a0 "zend_hash.c", __zend_lineno=588, __zend_orig_filename=0x0, 
    __zend_orig_lineno=0) at zend_alloc.c:483
483             switch (p->magic) {
(gdb) bt
#0  _mem_block_check (ptr=0x0, silent=1, __zend_filename=0x80d68a0 "zend_hash.c", __zend_lineno=588, __zend_orig_filename=0x0, 
    __zend_orig_lineno=0) at zend_alloc.c:483
#1  0x807c5b2 in _efree (ptr=0x0, __zend_filename=0x80d68a0 "zend_hash.c", __zend_lineno=588, __zend_orig_filename=0x0, 
    __zend_orig_lineno=0) at zend_alloc.c:170
#2  0x808b3de in zend_hash_destroy (ht=0x81339c4) at zend_hash.c:588
#3  0x80589de in php_rshutdown_basic (type=1, module_number=17) at basic_functions.c:423
#4  0x808841a in module_registry_cleanup (module=0x8145e68) at zend_API.c:847
#5  0x808b6c5 in zend_hash_apply (ht=0x8135e80, destruct=0x80883ec <module_registry_cleanup>) at zend_hash.c:708
#6  0x8087cb4 in zend_deactivate () at zend.c:461
#7  0x8076035 in php_request_shutdown (dummy=0x0) at main.c:780
#8  0x80587f4 in main (argc=2, argv=0xbffffc54) at cgi_main.c:500

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-02-01 14:13 UTC] andi at cvs dot php dot net
I can't reproduce this. If you can reproduce it again with a fresh CVS tree please let us know.
 [2000-02-01 23:50 UTC] rasmus at cvs dot php dot net
Oops, figured it out.  The PHP portion of my cvs tree on the chek machine where I saw this problem was pointing at the local /repository directory.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 09:01:33 2024 UTC