From:             steve at webdrive dot co dot nz
Operating system: Debian Linux 3.1
PHP version:      4.4.5
PHP Bug Type:     Session related
Bug description:  Segmentation fault on session_register of undeclared variable

Description:
------------
The upgrade from PHP 4.4.4 to 4.4.5 caused a Segmentation Fault on a
client's osCommerce site.  I've tracked the problem down to a
session_register function call on a undeclared variable.

Reproduce code:
---------------
<?php
session_start();
// Uncomment the following line to prevent the Segmentation Fault
//$myvar = 1;
session_register("myvar");

echo "Hello World";
?>


Expected result:
----------------
Hello World and no "Segmentation Fault" in Apache's error log:

[Sat Feb 17 21:14:16 2007] [notice] child pid 20549 exit signal
Segmentation fault (11)

Actual result:
--------------
0x080dbbc2 in php_add_session_var (name=0x850b75c "myvar", namelen=5)
    at /usr/src/apache-php/build/php-4.4.5/ext/session/session.c:287
287                     if ((Z_TYPE_PP(sym_global) == IS_ARRAY &&
Z_ARRVAL_PP(sym_global) == &EG(symbol_table)) || *sym_global ==
PS(http_session_vars)) {


-- 
Edit bug report at http://bugs.php.net/?id=40514&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40514&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40514&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40514&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40514&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40514&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40514&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40514&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40514&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40514&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40514&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40514&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40514&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40514&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40514&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40514&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40514&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40514&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40514&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40514&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40514&r=mysqlcfg

Reply via email to