Bug #71300 [NEW]: Segfault in zend_fetch_string_offset
From: stas
Operating system: Darwin
PHP version: 7.0.2RC1
Package: Reproducible crash
Bug Type: Bug
Bug description:Segfault in zend_fetch_string_offset
Description:
------------
The following code segaults on 7.x, doesn't on 5.x. Original report by
Brian Carpenter.
Test script:
---------------
<?php
for($s=STR;26>$x-=!$c=$s[$$x];)
echo $$s = $s[$$x++] = ++$c;
Expected result:
----------------
(a lot of garbage, no segfault)
Actual result:
--------------
TUS1VT1WU1XV1YW1ZX1AY1BZ1CA1DB1EC1FD1GE1HF1IG1JH1KI1LJ1MK1NL1OM1PN1QO1RP1SQ1TR1US1VT1WU1XV1YW1ZX1AY1BZ1CA1DB1EC1FD1GE1HF1IG1JH1KI1LJ1MK1NL1OM1PN1QO1RP1SQ1TR1US1VT1WU1XV1YW1ZX1AY1BZ1CA1DB1EC1FD1GE1HF1IG1JH1KI1LJ1MK1NL1OM1PN1QO1RP1SQ1TR1US1VT1WU1XV1YW1ZX1AY1BZ1CA1DB1EC1FD1GE1HF1IG1JH1KI1LJ1MK1NL1OM1PN1QO1RP1SQ1TR1US1VT1WU1XV1YW1ZX1AY1BZ1CA1DB1EC1FD1GE1HF1IG1JH1KI1LJ1MK1NL1OM1PN1QO1R-
Program received signal SIGSEGV, Segmentation fault.
--
Edit bug report at https://bugs.php.net/bug.php?id=71300&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71300&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71300&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71300&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71300&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71300&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71300&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71300&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71300&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71300&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71300&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71300&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71300&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71300&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71300&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71300&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71300&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71300&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71300&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71300&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71300&r=mysqlcfg
Thread (7 messages)
- stas@php.net