Bug #1652: Document contains no data
| From: | larosa at giotto dot info dot uniroma2 dot it | Date: | Fri, 02 Jul 1999 22:13:46 +0000 |
| Subject: | Bug #1652: Document contains no data | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-8027@lists.php.net to get a copy of this message | ||
From: larosa@giotto.info.uniroma2.it
Operating system: RedHat Linux 6.0 - Linux 2.2.9
PHP version: 3.0.11
PHP Bug Type: PostgreSQL related
Bug description: Document contains no data
Like in bug 1477 when i try to use pg_fetch_array or pg_fetch_object the related httpd child die
with a segmentation fault an the browser din't reciece anything and return "Document
contain no data".
I have no problem with pg_fetch_row or pg_result. Here is the backtrace that gdb produced when i
've tried to run httpd in it with the parameter "-X".
With pg_fetch_array:
#0 0x400f7626 in chunk_free (ar_ptr=0x40187580, p=0x80c34dd) at malloc.c:3006
#1 0x400f7505 in __libc_free (mem=0x80c34e4) at malloc.c:2932
#2 0x4022ee96 in php3_pgsql_fetch_hash (ht=0x80bd8f8,
return_value=0x40281334, list=0x40282840, plist=0x40282800)
at functions/pgsql.c:979
#3 0x4022eed1 in php3_pgsql_fetch_array (ht=0x80bd8f8,
return_value=0x40281334, list=0x40282840, plist=0x40282800)
at functions/pgsql.c:988
#4 0x4024457f in phpparse () at control_structures_inline.h:934
#5 0x4020c040 in php3_parse (yyin=0x80b6b80) at main.c:1553
#6 0x4020c31c in apache_php3_module_main (r=0x80a191c, fd=19,
display_source_mode=0, preprocessed=0) at main.c:1934
#7 0x40209542 in send_php3 ()
#8 0x402095aa in send_parsed_php3 ()
#9 0x80517e1 in ap_invoke_handler ()
#10 0x805e28b in ap_some_auth_required ()
#11 0x805e2db in ap_process_request ()
#12 0x8058c88 in ap_child_terminate ()
#13 0x8058dbf in ap_child_terminate ()
#14 0x8058eb9 in ap_child_terminate ()
#15 0x8059368 in ap_child_terminate ()
#16 0x8059920 in main ()
#17 0x400b6cb3 in __libc_start_main (main=0x80596e0 <main>, argc=2,
argv=0xbffffc14, init=0x804da1c <_init>, fini=0x8065a8c <_fini>,
rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffc0c)
at ../sysdeps/generic/libc-start.c:78
With pg_fetch_object:
#0 0x400f7626 in chunk_free (ar_ptr=0x40187580, p=0x80c34dd) at malloc.c:3006
#1 0x400f7505 in __libc_free (mem=0x80c34e4) at malloc.c:2932
#2 0x4022ee96 in php3_pgsql_fetch_hash (ht=0x80bd8f8,
return_value=0x40281334, list=0x40282840, plist=0x40282800)
at functions/pgsql.c:979
#3 0x4022eefb in php3_pgsql_fetch_object (ht=0x80bd8f8,
return_value=0x40281334, list=0x40282840, plist=0x40282800)
at functions/pgsql.c:996
#4 0x4024457f in phpparse () at control_structures_inline.h:934
#5 0x4020c040 in php3_parse (yyin=0x80b6b80) at main.c:1553
#6 0x4020c31c in apache_php3_module_main (r=0x80a191c, fd=19,
display_source_mode=0, preprocessed=0) at main.c:1934
#7 0x40209542 in send_php3 ()
#8 0x402095aa in send_parsed_php3 ()
#9 0x80517e1 in ap_invoke_handler ()
#10 0x805e28b in ap_some_auth_required ()
#11 0x805e2db in ap_process_request ()
#12 0x8058c88 in ap_child_terminate ()
#13 0x8058dbf in ap_child_terminate ()
#14 0x8058eb9 in ap_child_terminate ()
#15 0x8059368 in ap_child_terminate ()
#16 0x8059920 in main ()
#17 0x400b6cb3 in __libc_start_main (main=0x80596e0 <main>, argc=2,
argv=0xbffffc14, init=0x804da1c <_init>, fini=0x8065a8c <_fini>,
rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffc0c)
at ../sysdeps/generic/libc-start.c:78
The problem appear to be in php3_pgsql_fetch_hash when it call a malloc.
I hope that that is enough to find the problem