Bug #69020 [Opn->Fbk]: Possible memory corruption on file error messages

From: Date: Wed, 11 Feb 2015 14:30:18 +0000
Subject: Bug #69020 [Opn->Fbk]: Possible memory corruption on file error messages
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190586@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69020&edit=1 ID: 69020 Updated by: ab@php.net Reported by: php at maisqi dot com Summary: Possible memory corruption on file error messages -Status: Open +Status: Feedback Type: Bug Package: Filesystem function related Operating System: Windows 8.1 PHP Version: 5.6.5 Block user comment: N Private report: N New Comment: Please post a backtrace. Though, it sounds very similar to what was recently fixed in bug #68996. Maybe you also could check some latest snapshot. Thanks. Previous Comments: ------------------------------------------------------------------------ [2015-02-09 22:26:15] php at maisqi dot com Description: ------------ If I try to handle a file whose name is ISO-8859-1 (on a NTFS file system), and force some error, the error message is printed with some unexpected chars, besides those that are to be expected when we cross different character encodings. I tested this on PHP5.5 and it worked ok. PHP 5.6, 32 bits or 64 bits, print the strange chars and crashed a few times. I can't test this on Linux for now. Test script: --------------- file_get_contents (utf8_decode ('Z:/Voláção')); echo '<br />'; trigger_error(utf8_decode ('Z:/Voláção'), E_USER_WARNING); trigger_error(utf8_decode ('Z:/Voláção'), E_USER_WARNING); /** * Note: I repeated the trigger_error() solely to prove that the output * is not random. */ Expected result: ---------------- The script should emit three very similar error messages. Actual result: -------------- This is what I get on my system: Warning: <`d��� : failed to open stream: No such file or directory [...] Warning: Z:/Vol���o in D:\Apache\exp\web\exp.php on line 22 Warning: Z:/Vol���o in D:\Apache\exp\web\exp.php on line 23 The «garbage» chars are quite different in the first message. I suspect this is due to some memory corruption bug. In fact, this simple script crashes once in a while (at least on my system). ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69020&edit=1

« previous php.bugs (#190586) next »