From:             jhuston at cs dot umn dot edu
Operating system: Sparc Solaris 9
PHP version:      4.3.3RC1
PHP Bug Type:     Reproducible crash
Bug description:  exit signal Segmentation fault (11)

Description:
------------
Installed PHP 4.3.3RC1 as a DSO on Apache 2.0.47 with the mysql and oracle
and gd extension enabled.  I was able to reproduce same segfault error on
Apache 1.3.27 with DSO enabled. I can also reproduce the same problem from
line command.

It appears that it does go through to the end of the script but it just
dies before it could complete the script peacefully.

I'd get the same problem with my other scripts sharing the same set of
functions library.  I tracked down a possible cause of Bus Error or
Segmentation fault.  It appears that when the script is doing $_SESSION
variable assignments, it puked on exit.  When I commented out all lines
containing $_SESSION variable assignments, the script exited peacefully
without any seg fault or bus error.

Some useful Info:

[EMAIL PROTECTED] uname -a
SunOS scrabble 5.9 Generic sun4u sparc SUNW,Sun-Blade-100
[EMAIL PROTECTED] php -v
PHP 4.3.3RC1 (cli) (built: Jul 10 2003 01:47:16)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
[EMAIL PROTECTED] php -i
phpinfo()
PHP Version => 4.3.3RC1

System => SunOS scrabble 5.9 Generic sun4u
Build Date => Jul 10 2003 01:42:12
Configure Command =>  './configure'
'--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mcrypt'
'--with-mysql=/usr/local/mysql4' '--with-oci8' '--enable-track-vars'
'--with-openssl=/usr/local/openssl' '--with-gd'
'--with-jpeg-dir=/usr/local/lib' '--with-zlib-dir=/usr/local/lib'
'--with-png-dir=/usr/local/lib'
Server API => Command Line Interface



Reproduce code:
---------------
One of the source codes can be viewed at:

http://scrabble.cs.umn.edu/gradebook/index.phps

This link will disappear after this bug ticket has been fixed and closed.

Expected result:
----------------
Expected result would return a page from browser.  When it segfaults, it
returns blank.

When I run it from line command I'd get something like this:

[EMAIL PROTECTED] php index.php
<html><title></title>
<style type="text/css">
.
.
.
</table>
<tr><td><font color=#333366>Gradebook 1.0a &copy; 2002 Josh Huston, All
Rights Reserved</font></td></tr>
</table>
</html>
Bus error
[EMAIL PROTECTED] 

Actual result:
--------------
This is what i got when running gdb:

[EMAIL PROTECTED] gdb php 
GNU gdb 5.0
Copyright 2000 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 "sparc-sun-solaris2.8"...
(gdb) run index.php
Starting program: /usr/local/bin/php index.php
<html><title></title>
<style type="text/css">
.
.
(snip)
.
.
<tr><td><font color=#333366>Gradebook 1.0a &copy; 2002 Josh Huston, All
Rights Reserved</font></td></tr>
</table>
</html>

Program received signal SIGSEGV, Segmentation fault.
0x131d28 in _efree (ptr=0x2c0f80)
    at /home/src/php-4.3.3RC1/Zend/zend_alloc.c:259
259     in /home/src/php-4.3.3RC1/Zend/zend_alloc.c
(gdb) where
#0  0x131d28 in _efree (ptr=0x2c0f80)
    at /home/src/php-4.3.3RC1/Zend/zend_alloc.c:259
#1  0x91b9c in migrate_global (ht=0x32f1a0, pos=0x1)
    at /home/src/php-4.3.3RC1/ext/session/session.c:640
#2  0x91cbc in php_session_save_current_state ()
    at /home/src/php-4.3.3RC1/ext/session/session.c:670
#3  0x94828 in php_session_flush ()
    at /home/src/php-4.3.3RC1/ext/session/session.c:1593
#4  0x94858 in zm_deactivate_session (type=0, module_number=4)
    at /home/src/php-4.3.3RC1/ext/session/session.c:1607
#5  0x145934 in module_registry_cleanup (module=0x2ed858)
    at /home/src/php-4.3.3RC1/Zend/zend_API.c:1167
#6  0x147bfc in zend_hash_apply (ht=0x2c2484, 
    apply_func=0x1458f8 <module_registry_cleanup>)
    at /home/src/php-4.3.3RC1/Zend/zend_hash.c:688
#7  0x1426e0 in zend_deactivate_modules ()
    at /home/src/php-4.3.3RC1/Zend/zend.c:651
#8  0x112a14 in php_request_shutdown (dummy=0x0)
    at /home/src/php-4.3.3RC1/main/main.c:982
#9  0x15e438 in main (argc=2, argv=0xffbff67c)
    at /home/src/php-4.3.3RC1/sapi/cli/php_cli.c:874

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

Reply via email to