Re: [PHP4BETA] 'return' crash on Mac OS X Server with PHP 4.0b3

From: Date: Mon, 14 Feb 2000 20:33:00 +0000
Subject: Re: [PHP4BETA] 'return' crash on Mac OS X Server with PHP 4.0b3
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-10266@lists.php.net to get a copy of this message
I'm replying to my own message. I'm guessing my backtrace is probably not helpful because, as gdb notes, 'no debugging symbols found'. I'll see if I can recompile with debugging symbols and send a more helpful bug report. Sorry, Jon On Mon, 14 Feb 2000, Jon Jensen wrote: > Thanks for the help with gdb, Chad. Here's the backtrace when I run sqaure.php: > > > [viscom] root# gdb /usr/local/apache/bin/httpd > GNU gdb 4.17 (Apple version gdb-121) > Copyright 1998 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 "powerpc-apple-rhapsody". > Reading symbols from "/usr/local/apache/bin/httpd"...(no debugging symbols > found)...done. > Reading symbols from "/usr/lib/dyld" at 0x41100000 (offset 0x0) with prefix > "dyld_"...(no debugging symbols found)...done > Reading symbols from "/System/Library/Frameworks/System.framework/Versions/B/System" > at 0x41300000 (offset 0x0)...(no debugging symbols found)...done > (gdb) run -X > Starting program: /usr/local/apache/bin/httpd -X > [Switching to process 1247 thread 0x1400] > > Program received signal SIGSEGV, Segmentation fault. > 0x240a4 in ?? () > (gdb) bt > #0 0x240a4 in ?? () > #1 0x235e0 in ?? () > #2 0x60bd8 in ?? () > #3 0x6859c in ?? () > #4 0x26ca8 in ?? () > #5 0x24648 in ?? () > #6 0x22ac0 in ?? () > #7 0x22b20 in ?? () > #8 0xea1e8 in mergesort () > #9 0xf2d44 in mergesort () > #10 0xf2dd8 in mergesort () > #11 0xd660c in mergesort () > #12 0xd68a8 in mergesort () > #13 0xd6ad4 in mergesort () > #14 0xd756c in mergesort () > #15 0xd81a4 in mergesort () > #16 0x2b60 in ?? () > #17 0x2a20 in ?? () > (gdb) > > > I'll be glad to do anything else to help. > > Jon > > > On Mon, 14 Feb 2000, Chad Cunningham wrote: > > > A backtrace would be helpful... Shut down apache and start it up with > > > > gdb /path/to/httpd > > run -X > > > > hit the page in your webserver, gdb will notice the segfault. Then type bt > > and submit the output as a bug report. > > > > On Sat, 12 Feb 2000, Jon Jensen wrote: > > > > > I've gotten PHP 4.0b3 to work with Apache 1.3.11 on Mac OS X Server, but > > > there's a mysterious bug. With the 'square' function example in the > > > manual: > > > > > > function square ($num) { > > > return $num * $num; > > > } > > > echo square(4); > > > > > > It works fine with PHP 3.0.12. But 4.0b3 crashes with a 'document > > > contained no data' error to the browser. (I've tested it under Red Hat 6.1 > > > and it works fine in both versions.) However, if I change the code to > > > this: > > > > > > function square ($num) { > > > $val = $num * $num; > > > return $val; > > > } > > > echo square(4); > > > > > > It works fine. > > > > > > The only change I had to make to get PHP 4.0b3 to compile under Mac OS X > > > Server was to change line 232 of php.h from: > > > > > > #if (!HAVE_SNPRINTF) > > > > > > to > > > > > > #ifndef HAVE_SNPRINTF > > > > > > I don't know much about the C preprocessor, but it seems to make sense and > > > another guy who ported 3.0.11 did the same thing. However, maybe that's > > > the problem. The original code causes a 'parse error', thus the need for a > > > change. > > > > > > Does anyone know why that 'return' isn't working? These also fail: > > > > > > return "$j like $b"; > > > return $j . $b; > > > > > > I've never used gdb (or any other debugger) but am willing to learn if > > > it'll help. > > > > > > Jon Jensen > > > > > > > > > > > > > -- > > > > Chad Cunningham > > ccunning@math.ohio-state.edu > > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net >

« previous php.version4 (#10266) next »