Re: Fwd: [PHP-DEV] Output Buffering problem w/ PHP-4.0.5RC2
| From: | Anil Madhavapeddy | Date: | Sun, 01 Apr 2001 02:30:37 +0000 |
| Subject: | Re: Fwd: [PHP-DEV] Output Buffering problem w/ PHP-4.0.5RC2 | ||
| References: | 1 2 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-2697@lists.php.net to get a copy of this message | ||
Zeev Suraski wrote:
> Can you test the latest CVS (in either the HEAD or 4.0.5 branch?)
Now the headers get output, but the segfault is still there. I managed to
get the symbols loaded (forgot that 'sharedlibrary' in gdb helps!), so
here's the backtrace:
(gdb) bt
#0 zend_str_tolower (str=0x0, length=12) at zend_operators.c:1462
#1 0x4023dbe5 in call_user_function_ex (function_table=0xba340,
object_pp=0x0,
function_name=0x11138c, retval_ptr_ptr=0xdfbfd5fc, param_count=2,
params=0xdfbfd5e4, no_separation=1, symbol_table=0x0) at
zend_execute_API.c:396
#2 0x402f879a in php_end_ob_buffer (send_buffer=0 '\000', just_flush=0
'\000')
at output.c:169
#3 0x402f8aef in php_end_ob_buffers (send_buffer=0 '\000') at output.c:251
#4 0x4026b736 in php_request_shutdown (dummy=0x0) at main.c:643
#5 0x4026799f in php_apache_request_shutdown (dummy=0x0) at mod_php4.c:290
#6 0x2f306 in run_cleanups (c=0xf9e3c) at alloc.c:1947
#7 0x2e393 in ap_clear_pool (a=0xf800c) at alloc.c:690
#8 0x2e3f0 in ap_destroy_pool (a=0xf800c) at alloc.c:720
#9 0x2e37f in ap_clear_pool (a=0xb700c) at alloc.c:683
#10 0x3eeeb in child_main (child_num_arg=0) at http_main.c:4021
#11 0x3f48a in make_child (s=0x83034, slot=0, now=986057122) at
http_main.c:4411
#12 0x3f5a3 in startup_children (number_to_start=5) at http_main.c:4493
#13 0x3fd9d in standalone_main (argc=2, argv=0xdfbfd8e0) at http_main.c:4781
#14 0x4058c in main (argc=2, argv=0xdfbfd8e0) at http_main.c:5123
Looking at output.c and php_end_ob_buffer(), are the contents of
OG(active_ob_buffer).output_handler.value.str getting munged somewhere?
(gdb) select-frame 1
(gdb) print function_name->value->str
$2 = {val = 0x0, len = 12}
The call_user_function_ex() is being passed
OG(active_ob_buffer).output_handler, but this contains a null pointer for
the value->str->val part, with length of 12, and that's causing the
segfault. I assume that it should actually have 'ob_gzhandler' in there
instead of the null, but I'm not sure where the function name is getting
lost. The correct value is definitely set in php_ob_init().
Can anyone give me a hint as to how to view the contents of the OG global
variable in gdb? If I try to print it:
(gdb) print output_globals
Address of symbol "output_globals" is unknown.
So I can't really debug any more without being able to see inside that
variable. Hope this much helps anyway.
Anil