|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-03-09 15:13 UTC] helly@php.net
[2005-03-13 19:22 UTC] helly@php.net
[2005-05-03 14:55 UTC] helly@php.net
[2005-05-11 11:44 UTC] shulmanb at il dot ibm dot com
[2005-05-14 12:40 UTC] tony2001@php.net
[2005-05-15 09:15 UTC] shulmanb at il dot ibm dot com
[2005-05-18 14:38 UTC] tony2001@php.net
[2005-06-07 10:11 UTC] derick@php.net
[2005-06-07 10:23 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 18:00:01 2025 UTC |
Description: ------------ In some cases, when offsetSet throws an exception a segfault occurs. This does not happen when compiled with --enable-debug. Note that if the index passed to $list is positive or a string, not segfault occurs. Reproduce code: --------------- class a implements ArrayAccess { function offsetExists ($offset) { return false; } function offsetGet ($offset) { return null; } function offsetSet ($offset, $value) { throw new Exception ("Ooops"); } function offsetUnset ($offset) {} } function test() { $list = new a(); try { $list[-1] = 123; } catch (Exception $e) { } return true; } print test(); Expected result: ---------------- The output should be "1". Actual result: -------------- Segmentation fault. The stack trace reported in Visual Studio, using the latest snapshot and debug pack is: php5ts.dll!shutdown_memory_manager(int silent=0, int full_shutdown=0, void * * * tsrm_ls=0x00364b38) Line 490 + 0xb C php5ts.dll!php_request_shutdown(void * dummy=0x00000000) Line 1225 + 0x2f C msvcrt.dll!77c37bbe() user32.dll!77d5f160()