PHP 4.0 Bug #7866 Updated: PHP switch() with crashes the Apache child with a SegV (11)
| From: | sniper@php.net | Date: | Sun, 07 Jan 2001 08:48:28 +0000 |
| Subject: | PHP 4.0 Bug #7866 Updated: PHP switch() with crashes the Apache child with a SegV (11) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-43205@lists.php.net to get a copy of this message | ||
ID: 7866
Updated by: sniper
Reported By: comments@doofer.org
Old-Status: Open
Status: Closed
Bug Type: Reproduceable crash
Assigned To:
Comments:
I can not reproduce this with latest CVS. Please try PHP 4.0.4 and reopen
this bug report if problem still exists with it.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-11-27 08:41:13] comments@doofer.org
My last comments did not accurately give an indication of how to reproduce the bug. I didn't
realise at the time that it's the placement of the code that causes the problem. To reproduce
the problem , put the code segment I gave (basically a parse error) in a function that is included
from an included file.
e.g.
function myFunction($var) {
switch ($var) {
case 1,2:
}
}
in a file myfunctions.inc
allfunctions.inc includes file myfunctions.inc
index.html includes allfunctions.inc
access index.html -> crash
I also noticed I did not have the Zend optimizer running or even loaded on the machine that I have
this problem on. I can try the latest snapshot version, but here is a backtrace from 4.0.3pl1.
Thanks,
Derek
GDB backtrace:
GNU gdb 19991004
(gdb) run -X
Starting program: /usr/sbin/httpd -X
Program received signal SIGSEGV, Segmentation fault.
0x8112bed in _zval_ptr_dtor ()
(gdb) bt
#0 0x8112bed in _zval_ptr_dtor ()
#1 0x81408b1 in execute ()
#2 0x813dbe6 in execute ()
#3 0x813e6b0 in execute ()
#4 0x813e6b0 in execute ()
#5 0x813e6b0 in execute ()
#6 0x8119408 in zend_execute_scripts ()
#7 0x80afc71 in php_execute_script ()
#8 0x8122ee9 in apache_php_module_main ()
#9 0x80ad91b in send_php ()
#10 0x80ad948 in send_parsed_php ()
#11 0x8146c93 in ap_invoke_handler ()
#12 0x815a999 in ap_some_auth_required ()
#13 0x815a9fc in ap_process_request ()
#14 0x81521ee in ap_child_terminate ()
#15 0x815239c in ap_child_terminate ()
#16 0x81524f9 in ap_child_terminate ()
#17 0x8152b26 in ap_child_terminate ()
#18 0x81532c3 in main ()
#19 0x408d39cb in __libc_start_main (main=0x8152f6c <main>, argc=2,
argv=0xbffff9b4, init=0x807d3f0 <_init>, fini=0x81ff048 <_fini>,
rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffff9ac)
at ../sysdeps/generic/libc-start.c:92
PS: Happy Thanksgiving everyone.. was also why I haven't looked back at this until now :)
---------------------------------------------------------------------------
[2000-11-19 12:02:20] stas@php.net
Does not crash for me.
Could you try latest version from snaps.php.net?
Could you please also generate crash trace as described at
http://bugs.php.net/bugs-generating-backtrace.php?
Did you try it without the Optimizer?
---------------------------------------------------------------------------
[2000-11-17 11:54:02] comments@doofer.org
The script:
switch ($variable) {
case 1,2:
}
crashes. I typed it accidentally instead of this (which works as I intended):
switch ($variable) {
case1:
case2:
}
I have Apache 1.3.14 compiled with PHP4.0.3pl1 as well as mod_ssl (openssl) and mm. Compiled from
scratch on the same machine as it is running. I'm also using the Zend Optimizer 0.99 for PHP
4.0.3.
Script to make Apache, PHP and all other items:
cd /usr/src/apache
./configure
cd /usr/src/php
./configure --with-apache=../apache --with-my-sql ; make ; make install
cd /usr/src/openssl
./config ; make
cd /usr/src/mm
./configure --disable-shared ; make ; make install
cd /usr/src/mod_ssl
./configure --with-layout=Del --with-apache=../apache --with-ssl=../openssl --wi
th-mm=../mm --activate-module=src/modules/php4/libphp4.a
cd /usr/src/apache
make; make install
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7866