Bug #17786 Updated: Coredump on \\0 backref (011.phpt)

From: Date: Sun, 16 Jun 2002 16:27:29 +0000
Subject: Bug #17786 Updated: Coredump on \\0 backref (011.phpt)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10753@lists.php.net to get a copy of this message
ID: 17786 Updated by: rasmus@php.net Reported By: msopacua@idg.nl -Status: Open +Status: Feedback Bug Type: Regexps related Operating System: BSD/OS 4.2 PHP Version: 4.0CVS-2002-06-16 New Comment: Did you compile using --with-regex=system? That is known to be broken on some platforms. Previous Comments: ------------------------------------------------------------------------ [2002-06-16 12:25:00] msopacua@idg.nl Heck - this is even more complicated. If I take the 'FILE' section in 011.phpt and put it in 011.php, then use: $ /chroot/home/mdev/php4-200206160300/sapi/cli/php -e -f ./011.php abcdef123ghi all is fine. With make test it failes. The output of gdb is complete, just in case, here it is again: ---Type <return> to continue, or q <return> to quit--- #0 0x486b660f in memcpy () from /shlib/libc.so.2 (gdb) bt #0 0x486b660f in memcpy () from /shlib/libc.so.2 #1 0x814ed64 in ?? () #2 0x814f375 in ?? () #3 0x814f4c0 in ?? () #4 0x81c473a in ?? () #5 0x81b3d1b in ?? () #6 0x81851f1 in ?? () #7 0x81c9fdb in ?? () #8 0x806d8ce in ?? () (gdb) I've also topped make test while running, to see if I go through any shell limits, but php doesn't even go above 5 Megs and I can take 384 Meg in this shell. ------------------------------------------------------------------------ [2002-06-16 12:14:41] mfischer@php.net CLI ist just fine, it's even easier to debug. But I think your last submit missed the output of BT unless I'm missing something? ------------------------------------------------------------------------ [2002-06-16 12:11:33] msopacua@idg.nl Markus, Unless you have some tips, not covered in the generate backtrace links, the problem only occurs with the CLI - I cannot reproduce it in apache. As said: I've compiled php with --enable-debug, used: gdb -exec sapi/cli/php -core ./php.core And: gdb sapi/cli/php 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 "i386-unknown-bsdi4.2"... (gdb) set args -e -c /chroot/home/mdev/php4-200206160300/php.ini-dist -f /chroot/home/mdev/php4-200206160300/run-tests.php (gdb) set environment TEST_PHP_EXECUTABLE=/chroot/home/mdev/php4-200206160300/sapi/cli/php (gdb) run Starting program: /chroot/home/mdev/php4-200206160300/sapi/cli/php -e -c /chroot/home/mdev/php4-200206160300/php.ini-dist -f /chroot/home/mdev/php4-200206160300/run-tests.php ------------------------------------------------------------------------ [2002-06-16 11:31:27] mfischer@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ------------------------------------------------------------------------ [2002-06-16 11:17:13] msopacua@idg.nl I also tested sed to see if it's the system supplied regex library, but that's all ok: $ echo "abc123" | sed -e "s|123|def\0ghi|g" abcdef123ghi $ echo "abc123" | sed -e "s|123|def\\0ghi|g" abcdef123ghi $ echo "abc123" | sed -e "s|123|def\\\0ghi|g" abcdef\0ghi $ echo "abc123" | sed -e "s|123|def\\\\0ghi|g" abcdef\0ghi ------------------------------------------------------------------------ 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/17786 -- Edit this bug report at http://bugs.php.net/?id=17786&edit=1

« previous php.bugs (#10753) next »