From: Operating system: linux2.4.25 PHP version: 5.3.6 Package: Reproducible crash Bug Type: Bug Bug description:closure with use of referenced array -> SEGV
Description: ------------ If you reference an array (with instances) and 'use' that array in a closure (without referencing it again) you get a segmentation fault Using 'use (&$ar)' iso 'use ($ar)' fixes it. Test script: --------------- http://www.correct.nl/bug_closure_b338f79f99c96c55fc879211ca2fe370.php.txt Expected result: ---------------- exit 0, I guess Actual result: -------------- SEGV, gdb where -> #0 0x0827e6ff in zend_objects_store_del_ref_by_handle_ex () #1 0x0827e684 in zend_objects_store_del_ref () #2 0x082595a3 in _zval_dtor_func () #3 0x0824d238 in _zval_dtor () #4 0x0824d464 in _zval_ptr_dtor () #5 0x0826692a in _zend_hash_index_update_or_next_insert () #6 0x082677df in zend_hash_copy () #7 0x0825971f in _zval_copy_ctor_func () #8 0x0827f259 in _zval_copy_ctor () #9 0x08299456 in zend_send_by_var_helper_SPEC_VAR () #10 0x08299e34 in ZEND_SEND_VAR_SPEC_VAR_HANDLER () #11 0x08280901 in execute () #12 0x0825b513 in zend_execute_scripts () #13 0x0820088b in php_execute_script () #14 0x082ff885 in main () -- Edit bug report at https://bugs.php.net/bug.php?id=55425&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55425&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55425&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55425&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55425&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55425&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55425&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55425&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55425&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55425&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55425&r=support Expected behavior: https://bugs.php.net/fix.php?id=55425&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55425&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55425&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55425&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55425&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55425&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55425&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55425&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55425&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55425&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55425&r=mysqlcfg