ID: 45761 User updated by: a dot sanders at manchester dot ac dot uk Reported By: a dot sanders at manchester dot ac dot uk -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: Solaris 9 PHP Version: 5.2CVS-2008-08-11 Assigned To: fb-req-jani New Comment:
I don't think we're quite there yet. I copied and pasted your suggested command line and got the following: carew copacw/php5.2-200808110830 $ USE_ZEND_ALLOC=0 \ > TEST_PHP_EXECUTABLE=/home/copacw/php5.2-200808110830/sapi/cli/php \ > gdb --arg /home/copacw/php5.2-200808110830/sapi/cli/php -n \ > run-tests.php -n /home/copacw/php5.2-200808110110830/ GNU gdb 6.2.1 Copyright 2004 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 "sparc-sun-solaris2.9"... (gdb) run Starting program: /home/copacw/php5.2-200808110830/sapi/cli/php -n run-tests.php -n /home/copacw/php5.2-200808110110830/ bogus test name /home/copacw/php5.2-200808110110830/ Program exited normally. (gdb) (My apologies for being too dumb to sort this out myself.) Previous Comments: ------------------------------------------------------------------------ [2008-08-13 14:20:22] [EMAIL PROTECTED] Almost there. :) You tried to execute the php binary as a script, leave that sapi/cli/php out of the last path, it's supposed to be the s.c. top_srcdir. This should be correct for you: # USE_ZEND_ALLOC=0 \ TEST_PHP_EXECUTABLE=/home/copacw/php5.2-200808110830/sapi/cli/php \ gdb --arg /home/copacw/php5.2-200808110830/sapi/cli/php -n \ run-tests.php -n /home/copacw/php5.2-200808110110830/ (gdb) run <possible segfault> (gdb) bt Start copying the output of "bt" command from the line after the "run" command which has the line with the crash info. ------------------------------------------------------------------------ [2008-08-13 09:10:27] a dot sanders at manchester dot ac dot uk Output from gdb as follows. Is this what you were expecting? It doesn't crash out, so there's no backtrace. (gdb) run Starting program: /home/copacw/php5.2-200808110830/sapi/cli/php -n /home/copacw/php5.2-200808110830/sapi/cli/php run-tests.php -n /home/copacw/php5.2-200808110830/sapi/cli/php Warning: Unexpected character in input: '' (ASCII=16) state=1 in /home/copacw/php5.2-200808110830/sapi/cli/php on line 3309 Parse error: syntax error, unexpected T_STRING in /home/copacw/php5.2-200808110830/sapi/cli/php on line 3309 Program exited with code 0377. ------------------------------------------------------------------------ [2008-08-12 15:37:12] [EMAIL PROTECTED] This should work: # USE_ZEND_ALLOC=0 TEST_PHP_EXECUTABLE=/full/path/to/php \ gdb --arg /full/path/to/php -n /full/path/to/php \ run-tests.php -n /full/path/to/php/src/ ------------------------------------------------------------------------ [2008-08-12 15:13:20] a dot sanders at manchester dot ac dot uk When I compiled with ./configure --disable-all --enable-debug --with-pcre-regex I can do a make test and it gets to the same place as before (the cgi test) without core dumping. I then have to kill it before it consumes the system memory. You told me to run gdb as follows: USE_ZEND_ALLOC=0 gdb sapi/cli/php -n run-tests.php gdb wont accept such a command line, so I entered run -n run-tests.php from the gdb prompt and I then get the message: Starting program: /home/copacw/php5.2-200808110830/sapi/cli/php -n run-tests.php ERROR: environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable! Program exited with code 01. I've tried setting a TEST_PHP_EXECUTABLE environment variable to point to the php executable, but I still get the same message. ------------------------------------------------------------------------ [2008-08-12 14:32:08] [EMAIL PROTECTED] Add the output of '(gdb) bt' here of the crash. Compile using this configure line: # ./configure --disable-all --enable-debug Also, when you generate the backtrace, make sure you're not loading any php.ini file using the '-n' parameter. f.e. # USE_ZEND_ALLOC=0 gdb sapi/cli/php -n run-tests.php ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/45761 -- Edit this bug report at http://bugs.php.net/?id=45761&edit=1