Edit report at https://bugs.php.net/bug.php?id=61328&edit=1
ID: 61328 Updated by: php-bugs@lists.php.net Reported by: anil at saog dot net Summary: segmentation fault while traversing big arrays with foreach -Status: Feedback +Status: No Feedback Type: Bug Package: *General Issues Operating System: linux PHP Version: 5.4.0 New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2012-03-08 17:26:12] cataphr...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2012-03-08 16:14:40] anil at saog dot net Description: ------------ There happens a "segmentation fault" while traversing big arrays with "foreach". A sample backtrace: /opt/uwsgi/uwsgi(uwsgi_backtrace+0x2a) [0x807981a] /opt/uwsgi/uwsgi(uwsgi_segfault+0x2c) [0x807990c] /lib/libc.so.6 [0xb7b02e28] /opt/php54/lib/libphp5.so(zend_object_std_dtor+0x88) [0xb6509948] /opt/php54/lib/libphp5.so(zend_objects_free_object_storage+0x12) [0xb6509982] /opt/php54/lib/libphp5.so(zend_objects_store_free_object_storage+0x78) [0xb650ed28] /opt/php54/lib/libphp5.so [0xb64e021c] /opt/php54/lib/libphp5.so [0xb64eb623] /opt/php54/lib/libphp5.so(php_request_shutdown+0x172) [0xb648fe52] ./php_plugin.so(uwsgi_php_request+0x1e0) [0xb7fb8e90] Seg-faulted code (probably with 100.000 items or more): foreach ($options as $item) { if ($item['value'] == $value) { return $item['label']; } } Expected result: ---------------- no segmentation fault Actual result: -------------- segmentation fault ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61328&edit=1