[PHP-DEV] Crash in var_dump and print_r

2001-08-26 Thread Joey Smith
This may be due to the way domxml is doing things, but the test script in bug #10936 still creates a crash, and the backtrace points to zend_print_zval_r_ex...see attachment 1. Attachment 2 show that var_dump() gives more or less the same result. #0 0x81bf5d6 in zend_print_zval_r_ex

Re: [PHP-DEV] Crash in var_dump and print_r

2001-08-26 Thread Zeev Suraski
It looks like domxml is responsible here. The hash table that's sent to it contains a NULL value, which should be a valid zval *... Zeev At 13:04 26-08-01, Joey Smith wrote: This may be due to the way domxml is doing things, but the test script in bug #10936 still creates a crash, and the

Re: [PHP-DEV] Crash in var_dump and print_r

2001-08-26 Thread Joey Smith
OK, I'll track it down. Thanks. On Sun, 26 Aug 2001, Zeev Suraski wrote the following to Joey Smith : It looks like domxml is responsible here. The hash table that's sent to it contains a NULL value, which should be a valid zval *... Zeev At 13:04 26-08-01, Joey Smith wrote: This may

Re: [PHP-DEV] Crash in var_dump and print_r

2001-08-26 Thread George Schlossnagle
If NULL's a valid zval*, then both of thise routines need to be fixed to handle null pointers. Here's some patches: --- zend.c.orig Sun Aug 26 11:14:28 2001 +++ zend.c Sun Aug 26 11:20:22 2001 @@ -199,6 +199,10 @@ ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval

Re: [PHP-DEV] Crash in var_dump and print_r

2001-08-26 Thread Andi Gutmans
What Zeev meant is that it should be a valid zval * but it isn't. Andi At 11:31 AM 8/26/2001 -0400, George Schlossnagle wrote: If NULL's a valid zval*, then both of thise routines need to be fixed to handle null pointers. Here's some patches: --- zend.c.orig Sun Aug 26 11:14:28 2001 +++

Re: [PHP-DEV] Crash in var_dump and print_r

2001-08-26 Thread George Schlossnagle
p.s. casual inspection suggest that having NULL zval pointers in HashTables may break alot of places. On Sunday, August 26, 2001, at 11:31 AM, George Schlossnagle wrote: If NULL's a valid zval*, then both of thise routines need to be fixed to handle null pointers. Here's some patches:

Re: [PHP-DEV] Crash in var_dump and print_r

2001-08-26 Thread Andi Gutmans
At 11:45 AM 8/26/2001 -0400, George Schlossnagle wrote: Ahh... that makes much more sense. Should there be any protection though from populating a hash with NULL values, or is this solely the responsibility of the extension writer? While there is the zend_has_add_empty_element(), it appears

Re: [PHP-DEV] Crash in var_dump and print_r

2001-08-26 Thread George Schlossnagle
Sounds fair to me. On Sunday, August 26, 2001, at 11:51 AM, Andi Gutmans wrote: At 11:45 AM 8/26/2001 -0400, George Schlossnagle wrote: Ahh... that makes much more sense. Should there be any protection though from populating a hash with NULL values, or is this solely the responsibility

Re: [PHP-DEV] Crash in var_dump and print_r

2001-08-26 Thread Zeev Suraski
But it is not :) It was a double meaning sentence I guess, what I meant that what was *supposed* to be a valid zval *, was in fact a NULL (which is not a valid zval *) At 18:31 26-08-01, George Schlossnagle wrote: If NULL's a valid zval*, then both of thise routines need to be fixed to