Bug #54742 [Opn->Fbk]: ' The memory could not be "read" ' when calling mb_eregi_replace

From: Date: Sun, 12 Jun 2011 00:43:18 +0000
Subject: Bug #54742 [Opn->Fbk]: ' The memory could not be "read" ' when calling mb_eregi_replace
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-161333@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=54742&edit=1

 ID:                 54742
 Updated by:         felipe@php.net
 Reported by:        reg at argi dot ru
 Summary:            ' The memory could not be "read" ' when calling
                     mb_eregi_replace
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            Apache2 related
 Operating System:   Windows 2003
 PHP Version:        5.2.17
 Block user comment: N
 Private report:     N

 New Comment:

Please try using this snapshot:

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

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




Previous Comments:
------------------------------------------------------------------------
[2011-05-16 05:40:32] 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;
}



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54742&edit=1


Thread (3 messages)

« previous php.bugs (#161333) next »