Bug #17786 Updated: Coredump on \\0 backref (011.phpt)
| From: | msopacua at idg dot nl | Date: | Sun, 16 Jun 2002 16:11:34 +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-10749@lists.php.net to get a copy of this message | ||
ID: 17786
Updated by: msopacua@idg.nl
Reported By: msopacua@idg.nl
-Status: Feedback
+Status: Open
Bug Type: Regexps related
Operating System: BSD/OS 4.2
PHP Version: 4.0CVS-2002-06-16
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
[2002-06-16 11:02:59] msopacua@idg.nl
Make test creates a coredump in ext/standard/tests/regex/011.phpt
Compiled with --enable-debug but not much info:
(gdb) bt
#0 0x4893760f in memcpy () from /shlib/libc.so.2
#1 0x8153584 in ?? ()
#2 0x8153b95 in ?? ()
#3 0x8153ce0 in ?? ()
#4 0x81c8f5a in ?? ()
#5 0x81b853b in ?? ()
#6 0x8189a11 in ?? ()
#7 0x81ce7fb in ?? ()
#8 0x806e40e in ?? ()
The core was created when run from the debugger, with the -e option set
through set args.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17786&edit=1