Hi there,

I had to patch some code recently (imap module) and as a result the
patched module produces a segfault. The backtrace is in [1], notice the
second frame, according to
http://bugs.php.net/bugs-generating-backtrace.php
I should be able to see the function that causes the segfault by
executing print (char
*)(executor_globals.function_state_ptr->function)->common.function_name
but that doesn't work, gdb says "Attempt to extract a component of a
value that is not a structure.". I'm not a C coder and I have no idea
what that means :) Should I rather try to generate a core file and run
gdb with it? Any suggestion how I can get some debug info?

Versions:
Apache  1.3.26
PHP     php4 4.2.1-3 (built with --enable-debug)

TIA,
Igor

[1]:
neo:/usr/sbin# gdb /usr/sbin/apache
GNU gdb 2002-04-01-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-linux"...(no debugging symbols
found)...
(gdb) run -X -f /etc/apache/httpd.conf
Starting program: /usr/sbin/apache -X -f /etc/apache/httpd.conf
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...

... some lines later ...
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x4257001d in imap_getquotaroot () from
/usr/lib/php4/20020429-debug/imap.so
(gdb) 
(gdb) bt
#0  0x4257001d in imap_getquotaroot () from
/usr/lib/php4/20020429-debug/imap.so
#1  0x4253cf7a in zif_imap_get_quotaroot () from
/usr/lib/php4/20020429-debug/imap.so
#2  0x40274ca7 in execute () from /usr/lib/apache/1.3/libphp4.so
#3  0x40283dae in zend_execute_scripts () from
/usr/lib/apache/1.3/libphp4.so
#4  0x40292fc6 in php_execute_script () from
/usr/lib/apache/1.3/libphp4.so
#5  0x4028e67e in apache_php_module_main () from
/usr/lib/apache/1.3/libphp4.so
#6  0x4028f1ce in php_restore_umask () from
/usr/lib/apache/1.3/libphp4.so
#7  0x4028f235 in php_restore_umask () from
/usr/lib/apache/1.3/libphp4.so
#8  0x08053a94 in ap_invoke_handler ()
#9  0x0806339c in ap_some_auth_required ()
#10 0x080633f8 in ap_process_request ()
#11 0x0805cbdb in ap_child_terminate ()
#12 0x0805cd6c in ap_child_terminate ()
#13 0x0805ce89 in ap_child_terminate ()
#14 0x0805d365 in ap_child_terminate ()
#15 0x0805da6d in main ()
#16 0x400fb14f in __libc_start_main () from /lib/libc.so.6

-- 
ScanPlus GmbH NOC Ulm - Germany - Griesbadgasse 7-13 - D 89073 Ulm
TEL +49 731 920 13 100 - FAX +49 731 920 13 290
eMail: [EMAIL PROTECTED]
Amtsgericht Ulm - HRB3220 - Geschaeftsfuehrer: Juergen Hoermann

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to