Bug #50551 [Com]: mb_ereg + mb_eregi crash
| From: | webmaster at bluesting dot co dot za | Date: | Tue, 20 Sep 2011 07:58:33 +0000 |
| Subject: | Bug #50551 [Com]: mb_ereg + mb_eregi crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-163700@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=50551&edit=1
ID: 50551
Comment by: webmaster at bluesting dot co dot za
Reported by: r dot badding at gmail dot com
Summary: mb_ereg + mb_eregi crash
Status: Feedback
Type: Bug
Package: mbstring related
Operating System: win32 only - Windows XP
PHP Version: 5.2.12
Block user comment: N
Private report: N
New Comment:
I have had very similar issues! At first I never noticed mb_ereg issues or crashes, until I started
running some apache benchmarks on unrelated code to simulate server load, and noticed strange
crashes. I eventually isolated the crashes to mb_ereg related code. To benchmark code with Apache
Benchmark, I was using the "ab" command under apache/bin directory like this:
ab -t 30 -c 10 http://localhost/
With some mb_ereg code running in the very beginning (doing url detection). The actual code is
actually not important because I get crashes with every combination I try! I think using Apache
Benchmark is better than running this code in a loop because it will create 10 simultaneous
connections simulating higher load instead of just the one connection. When I convert my code to use
preg_match_all() ... I have NO issues! Only mb_ereg related functions causing crashes! I tried
mb_ereg() and mb_ereg_search_init() + mb_ereg_search_regs() with the same unpredictable crashes!
Try the code above with Apache Benchmark and the commands I gave above, you should definately be
able to simulate this issue!
Previous Comments:
------------------------------------------------------------------------
[2010-08-12 00:19:52] kalle@php.net
Have you tried on 5.3? I cannot reproduce it trunk and Vista x86 with memory_limit=128MB and
configure --enable-mbstring --enable-mbregex (no backtrack stack)
------------------------------------------------------------------------
[2010-01-02 17:04:34] r dot badding at gmail dot com
Still getting the same crash with the snapshot php-5.2-win32-VC6-x86-
latest.
I made sure I had the correct extension dir in php.ini and no other
php5ts.dll were found than the one in the snapshot.
I think I haven't screwed up anything, but of course there's always that
possibility. Don't think so though.
------------------------------------------------------------------------
[2009-12-30 14:43:24] jani@php.net
Please try using this snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Try the snap. Maybe it was fixed as I can't reproduce this. And when you reply, use the
"Edit submission" tab!
------------------------------------------------------------------------
[2009-12-30 13:42:16] r dot badding at gmail dot com
So, nobody can reproduce? The testcase is simple at least...
------------------------------------------------------------------------
[2009-12-22 15:00:27] r dot badding at gmail dot com
By crash, I mean a dialog box like this:
---------------------------
Visual Studio Just-In-Time Debugger
---------------------------
An unhandled win32 exception occurred in Apache.exe [4804]. Just-In-
Time
debugging this exception failed with the following error: No installed
debugger has Just-In-Time debugging enabled. In Visual Studio, Just-
In-
Time debugging can be enabled from Tools/Options/Debugging/Just-In-
Time.
Check the documentation index for 'Just-in-time debugging, errors' for
more information.
---------------------------
OK
---------------------------
When I have eAccelerator enabled, instead of the dialog box I get
these
into the Apache's error.log:
EACCELERATOR: PHP crashed on opline 7 of mb_ereg()
Sure, the error might be in somewhere else than in php, maybe in
Apache,
or the api dll or anywhere...
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=50551
--
Edit this bug report at https://bugs.php.net/bug.php?id=50551&edit=1