#32685 [NEW]: Segfault when using assignment by reference within function
From: david at davidheath dot org
Operating system: mandrake linux 10.1
PHP version: 4.3.11
PHP Bug Type: Reproducible crash
Bug description: Segfault when using assignment by reference within function
Description:
------------
The attached program always segfaults. I have stripped out as much code as
possible whilst ensuring that it still segfaults, I'm afraid I haven't been
able to make the repro code any simpler. The problem is either something to
do with the assignment by reference on line 11 in the test2::exists()
method, or otherwise something to do with the use of unserialize().
I'm using the standard build of php4.3.11 with no special modules.
Reproduce code:
---------------
$ wget http://www.davidheath.org/php_bug/crash.php.txt
$ wget http://www.davidheath.org/php_bug/testfile
$ mv crash.php.txt crash.php
$ php crash.php
Expected result:
----------------
no segfault, no output at all
Actual result:
--------------
[heathd@localhost dh]$ /usr/local/php4.3.11/bin/php.4.3.11 crash.php
Content-type: text/html
X-Powered-By: PHP/4.3.11
Segmentation fault (core dumped)
When I run with debug build, it doesn't segfault:
[heathd@localhost dh]$ /usr/local/php4.3.11_debug/bin/php.4.3.11
crash.php
Content-type: text/html
X-Powered-By: PHP/4.3.11
/home/heathd/downloads/php-4.3.11/Zend/zend_execute.c(279) : Freeing
0x081EA8A4 (12 bytes), script=crash.php
/home/heathd/downloads/php-4.3.11/Zend/zend_execute.c(282) : Freeing
0x081EA704 (28 bytes), script=crash.php
/home/heathd/downloads/php-4.3.11/Zend/zend_variables.c(111) : Actual
location (location was relayed)
--
Edit bug report at http://bugs.php.net/?id=32685&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32685&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32685&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32685&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32685&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32685&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32685&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32685&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32685&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32685&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32685&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32685&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32685&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32685&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32685&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32685&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32685&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32685&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32685&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32685&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32685&r=mysqlcfg
Thread (11 messages)
- david at davidheath dot org
- helly@php.net#32685 [Fbk]: Segfault when using assignment by reference within function
- tony2001@php.net#32685 [Opn->Fbk]: Segfault when using assignment by reference within function
- david at davidheath dot org#32685 [Fbk->Opn]: Segfault when using assignment by reference within function
- david at davidheath dot org#32685 [Opn]: Segfault when using assignment by reference within function
- ericvanblokland at gmail dot com#32685 [Com]: Segfault when using assignment by reference within function
- tony2001@php.net#32685 [Opn->Fbk]: Segfault when using assignment by reference within function
- david at davidheath dot org#32685 [Fbk->Opn]: Segfault when using assignment by reference within function
- sniper@php.net#32685 [Opn->Asn]: Segfault when using assignment by reference within function
- derick@php.net#32685 [Asn]: Segfault when using assignment by reference within function
- derick@php.net#32685 [Asn->Csd]: Segfault when using assignment by reference within function