From:             nospam at rshell dot org
Operating system: linux
PHP version:      4.3.2
PHP Bug Type:     Apache related
Bug description:  segmentation fault with old code

Description:
------------
when someone access an old forum page (modify old phpbb version), we get
segmentation fault in apache error log and the user get a blank page. The
funny thing is that when I try with --enable-debug the forum loads.

php compiled with:
--with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-ftp --with-gd
--with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6
--with-mcrypt --with-mysql=/usr/local/mysql --with-ttf
--with-freetype-dir=/usr --enable-gd-native-ttf --with-gettext
--with-mhash --with-imap --with-kerberos
--enable-inline-optimization --with-zlib-dir --with-openssl --with-pear
--enable-sockets --enable-track-vars --enable-magic-quotes --with-curl


here is the backtrace (no debug info, see above)

Program received signal SIGSEGV, Segmentation fault.
0x2c84ef76 in chunk_free () from /lib/i686/libc.so.6
(gdb) bt
#0  0x2c84ef76 in chunk_free () from /lib/i686/libc.so.6
#1  0x2c84ed24 in free () from /lib/i686/libc.so.6
#2  0x2cbd22dc in _efree (ptr=0x88a1814)
    at /home/rcs/php-4.3.2/Zend/zend_alloc.c:265
#3  0x2cbe99c2 in zend_restore_ini_entry_cb (ini_entry=0x831f7d8,
stage=8)
    at /home/rcs/php-4.3.2/Zend/zend_ini.c:53
#4  0x2cbe55bb in zend_hash_apply_with_argument (ht=0x82bd798,
    apply_func=0x2cbe997c <zend_restore_ini_entry_cb>, argument=0x8)
    at /home/rcs/php-4.3.2/Zend/zend_hash.c:707
#5  0x2cbe9aa0 in zend_ini_deactivate ()
    at /home/rcs/php-4.3.2/Zend/zend_ini.c:87
#6  0x2cbe0bb0 in zend_deactivate () at
/home/rcs/php-4.3.2/Zend/zend.c:656
#7  0x2cbb8bff in php_request_shutdown (dummy=0x0)
    at /home/rcs/php-4.3.2/main/main.c:985
#8  0x2cbfabb5 in apache_php_module_main (r=0x82258cc,
display_source_mode=0)
#9  0x2cbfb732 in send_php (r=0x82258cc, display_source_mode=0,
filename=0x0)
    at /home/rcs/php-4.3.2/sapi/apache/mod_php4.c:617
#10 0x2cbfb786 in send_parsed_php (r=0x82258cc)
    at /home/rcs/php-4.3.2/sapi/apache/mod_php4.c:632
#11 0x080546d3 in ap_invoke_handler ()
#12 0x08069b57 in process_request_internal ()
#13 0x08069f8f in ap_internal_redirect ()
#14 0x2c954dea in handle_dir () from /usr/local/apache/libexec/mod_dir.so
#15 0x080546d3 in ap_invoke_handler ()
#16 0x08069b57 in process_request_internal ()
#17 0x08069bb8 in ap_process_request ()

strace output:

read(9, "<?php\nfunction draw_menubox_head"..., 4096) = 702
_llseek(9, 702, [702], SEEK_SET)        = 0
ioctl(9, SNDCTL_TMR_TIMEBASE, 0x5e399740) = -1 ENOTTY (Inappropriate ioctl
for device)
read(9, "", 4096)                       = 0
read(9, "", 8192)                       = 0
ioctl(9, SNDCTL_TMR_TIMEBASE, 0x5e398700) = -1 ENOTTY (Inappropriate ioctl
for device)
close(9)                                = 0
munmap(0x21731000, 4096)                = 0
time(NULL)                              = 1058141468
write(22, "[Mon Jul 14 03:11:08 2003] [erro"..., 270) = 270
chdir("/")                              = 0
munmap(0x217f8000, 81920)               = 0
munmap(0x217ae000, 303104)              = 0
close(8)                                = 0
munmap(0x2173d000, 8192)                = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0
fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
read(6, 0x86c4c80, 8192)                = -1 EAGAIN (Resource temporarily
unavailable)
fcntl64(6, F_SETFL, O_RDWR)             = 0
write(6, "\1\0\0\0\1", 5)               = 5
shutdown(6, 2 /* send and receive */)   = 0
close(6)                                = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0
--- SIGSEGV (Segmentation fault) ---

Cheers
-J

Reproduce code:
---------------
<?php
function draw_menubox_header($titel){
$string = '<table>...' . $titel .
                       '...' .
                  '</table>' ;
return($string);
}
?>




-- 
Edit bug report at http://bugs.php.net/?id=24639&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24639&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24639&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=24639&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24639&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24639&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24639&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24639&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24639&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24639&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24639&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24639&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24639&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24639&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24639&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24639&r=gnused

Reply via email to