ID: 32254 Updated by: [EMAIL PROTECTED] Reported By: shulmanb at il dot ibm dot com -Status: Open +Status: Feedback Bug Type: Zend Engine 2 problem Operating System: Linux PHP Version: 5CVS-2005-03-09 (dev) New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Works fine here. Previous Comments: ------------------------------------------------------------------------ [2005-03-09 14:52:58] shulmanb at il dot ibm dot com Description: ------------ When compiled with --enable-maintainer-zts, having nested try-catch blocks may cause segfaults in some cases. In the following code fragment, commenting out the outer try-catch block solves the segfault. This DOES NOT HAPPEN when compiled with debug symbols. This may be related to bug #32252 (for instance, if the index to $list is positive, crash does not occur). Reproduce code: --------------- class a implements ArrayAccess { function offsetExists ($offset) { return false; } function offsetGet ($offset) { return null; } function offsetSet ($offset, $value) { throw new Exception ("Oops"); } function offsetUnset ($offset) { } } function test () { try { $list = new a(); $caught = 0; try { $list[-1] = 123; } catch (Exception $e) { $caught = 1; } if (!$caught) return false; return true; } catch (Exception $e) { return false; } } print test(); Expected result: ---------------- The output should be "1" Actual result: -------------- Segmentation fault. PHP was compiled without debug symbols. The stack trace provided by gdb was: #0 0x08184ecd in zend_hash_destroy (ht=0x8c579c08) at /root/php-5.0.3/Zend/zend_hash.c:524 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32254&edit=1