#23275 [NEW]: serialize(), $_SESSION, seg fault
| From: | moxley at moxleydata dot com | Date: | Fri, 18 Apr 2003 21:18:46 +0000 |
| Subject: | #23275 [NEW]: serialize(), $_SESSION, seg fault | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-37867@lists.php.net to get a copy of this message | ||
From: moxley at moxleydata dot com
Operating system: Linux 4.2
PHP version: 4.3.1
PHP Bug Type: Reproducible crash
Bug description: serialize(), $_SESSION, seg fault
PHP apparently crashes under these contidions:
1. Use of serialize() on the $_SESSION variable
-AND-
2. $_SESSION contains an object
-AND-
3. object's class is not defined within the context of the serialize()
call
Please contact me for gdb backtrace, php.ini, or other information if you
cannot reproduce the problem with the script below.
Code that breaks:
<?php
if( isset($_GET['serialize']) )
{
session_start();
$serialized = serialize($_SESSION); // Causes seg fault
print "Did not crash";
}
else
{
session_start();
class Simple {}
$_SESSION['simpleObj'] = new Simple();
print '<a href="' . $_SERVER['PHP_SELF'] .
'?serialize">serialize</a>';
}
?>
Apache 1.3.27 error log:
[Fri Apr 18 14:04:05 2003] [notice] child pid 15705 exit signal
Segmentation fault (11)
[Fri Apr 18 14:04:05 2003] [notice] child pid 15697 exit signal
Segmentation fault (11)
[Fri Apr 18 14:04:05 2003] [notice] child pid 15693 exit signal
Segmentation fault (11)
--
Edit bug report at http://bugs.php.net/?id=23275&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23275&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23275&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23275&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23275&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23275&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23275&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23275&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23275&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23275&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23275&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23275&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23275&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23275&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23275&r=gnused