Bug #67314 [NEW]: Segmentation fault in gc_remove_zval_from_buffer
From: webm4st0r at gmail dot com
Operating system: CentOS confirmed
PHP version: 5.5.12
Package: Reproducible crash
Bug Type: Bug
Bug description:Segmentation fault in gc_remove_zval_from_buffer
Description:
------------
I have encountered a reproducible crash on PHP 5.5.0 and greater.
This is simple to work around as it just requires that you declare
variables properly, but I suspect the engine should not segfault :).
This seems to require that a custom error handler be registered.
I reported a similar bug a while back that this reminds me of, but may
not be related:
https://bugs.php.net/bug.php?id=66127
3v4l output:
http://3v4l.org/lespU
Test script:
---------------
<?php
function crash()
{
$notDefined[$i] = 'test';
}
function error_handler() { return false; }
set_error_handler('error_handler');
crash();
echo "made it once\n";
crash();
echo "ok\n";
Expected result:
----------------
Notice: Undefined variable: i in /in/lespU on line 4
made it once
Notice: Undefined variable: i in /in/lespU on line 4
ok
Actual result:
--------------
Notice: Undefined variable: i in /in/lespU on line 4
made it once
Notice: Undefined variable: i in /in/lespU on line 4
Process exited with code 139.
--
Edit bug report at https://bugs.php.net/bug.php?id=67314&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67314&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67314&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67314&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67314&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67314&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67314&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67314&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67314&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67314&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67314&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=67314&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=67314&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67314&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67314&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67314&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67314&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67314&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67314&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67314&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67314&r=mysqlcfg
Thread (5 messages)
- webm4st0r at gmail dot com