On Mon, 17 Jan 2005 12:36:22 +0100 Stefan Esser <[EMAIL PROTECTED]> wrote:
> Hi Antony, > > > The patch looks obviously wrong: > > > > > >>+static inline void var_push_dtor(php_unserialize_data_t *var_hashx, > >>zval **rval)+{ > > > > .. > > > >>+ var_push_dtor(var_hash, old_data); > > > > > > The last line should look like this: > > var_push_dtor(var_hash, &old_data); > > > > The type is wrong it should be zval **old_data; to fix the warning > the rest of the patch is okay. Your fix segfaults because it is wrong. I got this after your last commit, where you've fixed compiler warnings. (gdb) r ext/standard/tests/serialize/001.php Starting program: /home/dev/php-src/sapi/cli/php ext/standard/tests/serialize/001.php __sleep called O:1:"s":2:{s:1:"a";s:5:"hallo";s:1:"c";s:5:"world";} __wakeup called [Mon Jan 17 14:40:35 2005] Script: 'ext/standard/tests/serialize/001.php' --------------------------------------- /home/dev/php-src/ext/standard/var_unserializer.re(134) : Block 0x082CE104 status: Beginning: Overrun (magic=0x08232520, expected=0x7312F8DC) End: Unknown --------------------------------------- Program received signal SIGSEGV, Segmentation fault. 0x08176157 in _zval_ptr_dtor (zval_ptr=0x82ce124, __zend_filename=0x823bac0 "/home/dev/php-src/Zend/zend_execute.h", __zend_lineno=127) at /home/dev/php-src/Zend/zend_execute_API.c:389 389 (*zval_ptr)->refcount--; (gdb) bt #0 0x08176157 in _zval_ptr_dtor (zval_ptr=0x82ce124, __zend_filename=0x823bac0 "/home/dev/php-src/Zend/zend_execute.h", __zend_lineno=127) at /home/dev/php-src/Zend/zend_execute_API.c:389 #1 0x081ef532 in zend_ptr_stack_clear_multiple () at zend_execute.h:127 #2 0x081a6067 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffd3d0) at zend_vm_execute.h:273 #3 0x081a85a7 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbfffd3d0) at zend_vm_execute.h:1534 #4 0x081a586f in execute (op_array=0x82dc234) at zend_vm_execute.h:78 #5 0x08182a23 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/dev/php-src/Zend/zend.c:1058 #6 0x081429a5 in php_execute_script (primary_file=0xbffff7e0) at /home/dev/php-src/main/main.c:1641 #7 0x081f2ab5 in main (argc=2, argv=0xbffff874) at /home/dev/php-src/sapi/cli/php_cli.c:944 #8 0x420157a4 in __libc_start_main () from /lib/tls/libc.so.6 -- Wbr, Antony Dovgal aka tony2001 [EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php