Bug #74804 [NEW]: Segfault when instantiating object in array
From: steve dot hall+bugs dot php dot net at rg456 dot co dot uk
Operating system: Alpine 3.4 & Windows 10
PHP version: 7.1.6
Package: Reproducible crash
Bug Type: Bug
Bug description:Segfault when instantiating object in array
Description:
------------
I get a segmentation fault on this line:
https://github.com/symfony/symfony/blob/v3.3.2/src/Symfony/Component/VarDumper/Cloner/VarCloner.php#L123
The line runs perfectly well a few thousand times, but then seg faults
at a certain point.
I have been unable to recreate the bug in anything less than the total
application that I am working on, and at this time I'm unable to share
the full source code. I have tried capturing the state of all the
variables involved using xDebug and reproducing in a standalone script
but that doesn't cause the seg fault. I've serialized the variables and
then attempted to read them back in and run the code in question but
that doesn't cause it either.
I've tried on Windows 10 with PHP 7.1.6 and Alpine Linux 3.4 with PHP
7.1.6 (in a container) and get the same seg fault on both.
Test script:
---------------
Have been unable to demonstrate in anything less than the full
application.
Expected result:
----------------
No segmentation fault.
Actual result:
--------------
GDB output and valgrind are here:
https://gist.github.com/sh41/c1b5b6d0f2539357303fa43961fe2c95
--
Edit bug report at https://bugs.php.net/bug.php?id=74804&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74804&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74804&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74804&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74804&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74804&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74804&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74804&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74804&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74804&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74804&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74804&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74804&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74804&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74804&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74804&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74804&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74804&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74804&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74804&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74804&r=mysqlcfg
Thread (13 messages)
- steve dot hall+bugs dot php dot net at rg456 dot co dot uk
- nikic@php.netBug #74804 [Opn]: Segfault when instantiating object in array
- steve dot hall+bugs dot php dot net at rg456 dot co dot ukBug #74804 [Opn]: Segfault when instantiating object in array
- steve dot hall+bugs dot php dot net at rg456 dot co dot ukBug #74804 [Opn]: Segfault when instantiating object in array
- steve dot hall+bugs dot php dot net at rg456 dot co dot ukBug #74804 [Opn]: Segfault when instantiating object in array
- nikic@php.netBug #74804 [Opn]: Segfault when instantiating object in array
- steve dot hall+bugs dot php dot net at rg456 dot co dot ukBug #74804 [Opn]: Segfault when instantiating object in array
- nikic@php.netBug #74804 [Opn]: Segfault when instantiating object in array
- steve dot hall+bugs dot php dot net at rg456 dot co dot ukBug #74804 [Opn]: Segfault when instantiating object in array
- nikic@php.netBug #74804 [Opn]: Segfault when instantiating object in array
- steve dot hall+bugs dot php dot net at rg456 dot co dot ukBug #74804 [Opn]: Segfault when instantiating object in array
- cmb@php.netBug #74804 [Opn->Fbk]: Segfault when instantiating object in array
- steve dot hall+bugs dot php dot net at rg456 dot co dot ukBug #74804 [Fbk->Csd]: Segfault when instantiating object in array