#27342 [Opn->Fbk]: zend_fetch_debug_backtrace segfault
| From: | sniper@php.net | Date: | Wed, 07 Apr 2004 15:17:44 +0000 |
| Subject: | #27342 [Opn->Fbk]: zend_fetch_debug_backtrace segfault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-57720@lists.php.net to get a copy of this message | ||
ID: 27342
Updated by: sniper@php.net
Reported By: nlopess@php.net
-Status: Open
+Status: Feedback
Bug Type: Zend Engine 2 problem
Operating System: linux x86_64
PHP Version: 5CVS-2004-03-15
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2004-03-18 17:10:16] rrichards@php.net
Within the while loop, args gets totally hosed on the line:
args -= *(ulong*)args; (line 1566 zend_builtin_functions.c)
while (--args >= EG(argument_stack).elements) {
if (*args--) {
break;
}
args -= *(ulong*)args;
....
EG(argument_stack).element = (void **) 0x2a9556d960
args before offending line = (void **) 0x2a9556d958
args after = (void **) 0x2d2d2d5a9556c958
Totally messes up the while test and segfaults
------------------------------------------------------------------------
[2004-03-15 10:32:08] nlopess@php.net
I'm using a Pentium 4 and Win XP.
------------------------------------------------------------------------
[2004-03-15 08:50:16] abies@php.net
Doesn't crash on Alpha either.
------------------------------------------------------------------------
[2004-03-15 08:46:15] sniper@php.net
Does not crash on 32bit system..so this is propably some 64bit issue
again?
------------------------------------------------------------------------
[2004-03-15 06:21:41] rrichards@php.net
Re-opening as this looks like the same issue. Running Fedora Core 1
x86_64 all exceptions (wether caught or not) cause a segfault in
zend_fetch_debug_backtrace.
<?php
throw new exception("blah");
?>
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 182894216928 (LWP 4233)]
0x000000000063ec12 in zend_fetch_debug_backtrace
(return_value=0x2a955a0ed8,
skip_last=0) at
/home/rrichards/php5/Zend/zend_builtin_functions.c:1554
1554 if (*args--) {
(gdb) bt
#0 0x000000000063ec12 in zend_fetch_debug_backtrace (
return_value=0x2a955a0ed8, skip_last=0)
at /home/rrichards/php5/Zend/zend_builtin_functions.c:1554
#1 0x0000000000642894 in zend_default_exception_new
(class_type=0x81d060)
at /home/rrichards/php5/Zend/zend_exceptions.c:88
#2 0x0000000000630c2b in _object_and_properties_init
(arg=0x2a955a0fc8,
class_type=0x81d060, properties=0x0,
__zend_filename=0x6ada80
"/home/rrichards/php5/Zend/zend_execute.c",
__zend_lineno=3184) at /home/rrichards/php5/Zend/zend_API.c:714
#3 0x0000000000630c70 in _object_init_ex (arg=0x2a955a0fc8,
class_type=0x81d060,
__zend_filename=0x6ada80
"/home/rrichards/php5/Zend/zend_execute.c",
__zend_lineno=3184) at /home/rrichards/php5/Zend/zend_API.c:721
#4 0x000000000065b0a2 in zend_new_handler (execute_data=0x7fbfffc830,
opline=0x2a955a1db0, op_array=0x2a955a1a00)
at /home/rrichards/php5/Zend/zend_execute.c:3184
#5 0x0000000000655416 in execute (op_array=0x2a955a1a00)
at /home/rrichards/php5/Zend/zend_execute.c:1339
#6 0x000000000062e2b3 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/rrichards/php5/Zend/zend.c:1041
#7 0x00000000005e0f65 in php_execute_script
(primary_file=0x7fbfffef10)
at /home/rrichards/php5/main/main.c:1650
#8 0x0000000000663ae6 in main (argc=2, argv=0x7fbffff098)
at /home/rrichards/php5/sapi/cli/php_cli.c:943
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27342
--
Edit this bug report at http://bugs.php.net/?id=27342&edit=1