Bug #72854 [NEW]: PHP Crashes on duplicate destructor call

From: Date: Tue, 16 Aug 2016 14:47:43 +0000
Subject: Bug #72854 [NEW]: PHP Crashes on duplicate destructor call
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203311@lists.php.net to get a copy of this message
From: php at abiusx dot com Operating system: Mac OS X, Linux PHP version: 7.0.9 Package: Class/Object related Bug Type: Bug Bug description:PHP Crashes on duplicate destructor call Description: ------------ I have a very complicated code that runs for 4 minutes. The important thing the code does, is it makes deep copies of data structures in PHP, does something, and discards the deep copy. Many times when this happens, PHP segfaults (typically with memory violation) when the destructor of a deep copied object is called, and a resource is involved in that object. Examples are wp-db and phpmailer classes in Wordpress, both of which segfault PHP on their destructor. I still haven't had the chance to run PHP's debug version on it to figure out the details, but now I'm sure the bug is there (and has been since PHP 7.0.0, also tested on PHP 5.4 and it persists). Test script: --------------- github.com/abiusx/php-emul concolic mode on Wordpress and Joomla causes the crash. The crash is not stack related, it is also deterministic. Expected result: ---------------- No crash Actual result: -------------- Segfault (memory violation) -- Edit bug report at https://bugs.php.net/bug.php?id=72854&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72854&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72854&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72854&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72854&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72854&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72854&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72854&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72854&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72854&r=support Expected behavior: https://bugs.php.net/fix.php?id=72854&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72854&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72854&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72854&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72854&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72854&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72854&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72854&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72854&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72854&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72854&r=mysqlcfg

« previous php.bugs (#203311) next »