php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54742 ' The memory could not be "read" ' when calling mb_eregi_replace
Submitted: 2011-05-16 05:40 UTC Modified: 2013-02-18 00:34 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: reg at argi dot ru Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 5.2.17 OS: Windows 2003
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: reg at argi dot ru
New email:
PHP Version: OS:

 

 [2011-05-16 05:40 UTC] reg at argi dot ru
Description:
------------
From time to time in the line / * dead line * /$str = mb_eregi_replace ( "U\\+([A-F0-9]{4})", "U+\\1", $str); apache error:
Application popup: httpd.exe - Application Error: The instruction at "0x016657e9" referenced memory at "0x00000001" (sometimes 000100 or 000002). The memory could not be "read".

OR The instruction at "0x0165c37a" referenced memory at "0x6f647468". The memory could not be "read".

If an error occurs at least once, it starts to appear each time you run this line.
Write a short script that causes this error I could not.

At address 0x016657e9 located php_mbstring.dll (base address 0x01640000, file version 5.2.17.17).




Test script:
---------------
function smartUtf8to1251($str) {
	mb_internal_encoding("utf-8");
	mb_substitute_character('long');
	/*dead line*/$str = mb_eregi_replace ( "U\\+([A-F0-9]{4})", "U+\\1", $str);
	$str = mb_convert_encoding($str, 'windows-1251', 'utf-8');
	$str = preg_replace("~U\+([A-F0-9]{4})~ie", '"&#".hexdec("$1").";"', $str);
	return $str;
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-06-12 02:43 UTC] felipe@php.net
-Status: Open +Status: Feedback
 [2011-06-12 02:43 UTC] felipe@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 00:01:30 2024 UTC