|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-04-12 18:16 UTC] david at davidheath dot org
Description: ------------ The attached program always segfaults. I have stripped out as much code as possible whilst ensuring that it still segfaults, I'm afraid I haven't been able to make the repro code any simpler. The problem is either something to do with the assignment by reference on line 11 in the test2::exists() method, or otherwise something to do with the use of unserialize(). I'm using the standard build of php4.3.11 with no special modules. Reproduce code: --------------- $ wget http://www.davidheath.org/php_bug/crash.php.txt $ wget http://www.davidheath.org/php_bug/testfile $ mv crash.php.txt crash.php $ php crash.php Expected result: ---------------- no segfault, no output at all Actual result: -------------- [heathd@localhost dh]$ /usr/local/php4.3.11/bin/php.4.3.11 crash.php Content-type: text/html X-Powered-By: PHP/4.3.11 Segmentation fault (core dumped) When I run with debug build, it doesn't segfault: [heathd@localhost dh]$ /usr/local/php4.3.11_debug/bin/php.4.3.11 crash.php Content-type: text/html X-Powered-By: PHP/4.3.11 /home/heathd/downloads/php-4.3.11/Zend/zend_execute.c(279) : Freeing 0x081EA8A4 (12 bytes), script=crash.php /home/heathd/downloads/php-4.3.11/Zend/zend_execute.c(282) : Freeing 0x081EA704 (28 bytes), script=crash.php /home/heathd/downloads/php-4.3.11/Zend/zend_variables.c(111) : Actual location (location was relayed) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 13:00:01 2025 UTC |
Hi thanks for following this up. I tried with the snapshot you gave and still got the crash. I tried running it in gdb as well ('fraid I don't really know whether this helps or not). See below. Dave [heathd@dh dh]$ gdb GNU gdb 6.2-2mdk (Mandrakelinux) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-mandrake-linux-gnu". (gdb) file /usr/local/src/php4-STABLE-200505110647/sapi/cli/php Reading symbols from /usr/local/src/php4-STABLE-200505110647/sapi/cli/php...done. Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) run crash2.php Starting program: /usr/local/src/php4-STABLE-200505110647/sapi/cli/php crash2.php Program received signal SIGSEGV, Segmentation fault. 0x08111a41 in shutdown_memory_manager (silent=0, clean_cache=0) at /usr/local/src/php4-STABLE-200505110647/Zend/zend_alloc.c:530 530 REMOVE_POINTER_FROM_LIST(t); (gdb) quit