Re: php backtraces with gdb print gibberish for function name

From: Date: Mon, 05 Aug 2002 06:23:50 +0000
Subject: Re: php backtraces with gdb print gibberish for function name
Groups: php.general 
Request: Send a blank email to php-general+get-111163@lists.php.net to get a copy of this message
>I have have a PHP script that is core dumping, I'm trying to find out >exactly where. I carefully followed the instructions on > >http://bugs.php.net/bugs-generating-backtrace.php > >with a little help in creating an apache debug build using: > >http://www.bowiesnyder.com/writings/gdb_apache.htm > >however, when I get to the end bit where it's supposed to print out the >function that was causing the seg fault (I've already typed "frame x" >where x is the lowest-numbered execute() call), I get crap: > >(gdb) print (char >*)(executor_globals.function_state_ptr->function)->common.function_name >$2 = 0x83a2be0 "´\221/\b\024àJ\bÜï[\b´ì0\b" > >where it should say, according to the bugs.php.net page above, something >like: > >(gdb) print (char >*)(executor_globals.function_state_ptr->function)->common.function_name >$14 = 0x80fa6fa "pg_result_error" > >I can't find any docs anywhere on what else I can ask executor_globals >for... getting executor_globals.active_op_array->function_name returns >one of my functions, but that's not terribly useful without knowing what >line of it caused the segfault. > >Any suggestions for futher probing? Quite possibly, whatever went wrong has so corrupted the stack and such-like that what you are seeing is what's there. While it is gibberish, it's meaningful gibberish :-) Somebody somewhere might be able to interpret it. Your best bet at this point is to post the gdb output to http://bugs.php.net with the smallest/shortest PHP script you can make that causes it. But first, check *VERY* carefully the version numbers of the software you're using and that PHP thinks you are using: Example: If <?php phpinfo();?> says you are using MySQL 3.22.34 but on the command line mysql -v says you are using 3.22.32 you are in trouble. It will "work" okay, sorta, kinda, maybe, until you happen to try to use the function[s] that change between 3.22.34 and 3.22.32 and then it blows up in your face like above... It could easily be "before" the actual breaking-point of your script, so check *ALL* the software involved in your script and/or make a shorter script to narrow your focus. -- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.

« previous php.general (#111163) next »