#19223 [NEW]: unserializing objects crashes apache
| From: | tysonlt at _S_P_A_M_webmedia dot com dot au | Date: | Wed, 04 Sep 2002 07:22:09 +0000 |
| Subject: | #19223 [NEW]: unserializing objects crashes apache | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-18388@lists.php.net to get a copy of this message | ||
From: tysonlt@_S_P_A_M_webmedia.com.au
Operating system: Redhat 7.2
PHP version: 4CVS-2002-09-04
PHP Bug Type: Class/Object related
Bug description: unserializing objects crashes apache
Hi,
I'm actually using 200209032100.
this script will cause apache to segfault:
<?php
class TestClass { }
$str = serialize(new TestClass());
echo $str;
unserialize($str);
?>
Comment out the unserialize() line and it works fine.
Here is the backtrace:
#0 0x401c42a8 in __clz_tab () from /lib/i686/libc.so.6
#1 0x40329b6a in _object_and_properties_init (arg=0x407844e4,
class_type=0x811f7b4, properties=0x0)
at /usr/local/src/php-4.3.0-dev-zend2-alpha2/Zend/zend_API.c:603
#2 0x40329ba7 in _object_init_ex (arg=0x407844e4, class_type=0x811f7b4)
at /usr/local/src/php-4.3.0-dev-zend2-alpha2/Zend/zend_API.c:610
#3 0x402c84d5 in php_var_unserialize (rval=0xbfffdb74, p=0xbfffdb54,
max=0x40784630 "", var_hash=0xbfffdb58)
at
/usr/local/src/php-4.3.0-dev-zend2-alpha2/ext/standard/var_unserializer.c:192
#4 0x402c0fdd in zif_unserialize (ht=1, return_value=0x407844e4,
this_ptr=0x0, return_value_used=0)
at /usr/local/src/php-4.3.0-dev-zend2-alpha2/ext/standard/var.c:667
#5 0x4033d231 in execute (op_array=0x40783fb4)
at /usr/local/src/php-4.3.0-dev-zend2-alpha2/Zend/zend_execute.c:2103
#6 0x40328817 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /usr/local/src/php-4.3.0-dev-zend2-alpha2/Zend/zend.c:833
#7 0x4030319d in php_execute_script (primary_file=0xbffff5c0)
at /usr/local/src/php-4.3.0-dev-zend2-alpha2/main/main.c:1380
#8 0x40344102 in apache_php_module_main (r=0x8124d34,
display_source_mode=0)
at
/usr/local/src/php-4.3.0-dev-zend2-alpha2/sapi/apache/sapi_apache.c:55
#9 0x40344bf2 in send_php (r=0x8124d34, display_source_mode=0,
filename=0x0)
at
/usr/local/src/php-4.3.0-dev-zend2-alpha2/sapi/apache/mod_php4.c:550
#10 0x40344c56 in send_parsed_php (r=0x8124d34)
at
/usr/local/src/php-4.3.0-dev-zend2-alpha2/sapi/apache/mod_php4.c:565
#11 0x0806a87f in ap_invoke_handler () at eval.c:41
#12 0x0807f3e3 in process_request_internal () at eval.c:41
#13 0x0807f444 in ap_process_request () at eval.c:41
#14 0x0807644d in child_main () at eval.c:41
#15 0x080765f8 in make_child () at eval.c:41
#16 0x0807676c in startup_children () at eval.c:41
#17 0x08076de4 in standalone_main () at eval.c:41
#18 0x08077647 in main () at eval.c:41
#19 0x400b2627 in __libc_start_main (main=0x80772a0 <main>, argc=2,
ubp_av=0xbffffa14, init=0x804e644 <_init>, fini=0x8094e00 <_fini>,
rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffffa0c)
at ../sysdeps/generic/libc-start.c:129
--
Edit bug report at http://bugs.php.net/?id=19223&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19223&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19223&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19223&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19223&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19223&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19223&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19223&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19223&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19223&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19223&r=globals