#46051 [Opn->Csd]: SplFileInfo::openFile - memory overlap
| From: | lbarnaud@php.net | Date: | Thu, 11 Sep 2008 15:32:44 +0000 |
| Subject: | #46051 [Opn->Csd]: SplFileInfo::openFile - memory overlap | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-128887@lists.php.net to get a copy of this message | ||
ID: 46051
Updated by: lbarnaud@php.net
Reported By: felipe@php.net
-Status: Open
+Status: Closed
Bug Type: SPL related
PHP Version: 5.3CVS-2008-09-11 (CVS)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2008-09-11 13:46:35] felipe@php.net
Description:
------------
==906== Source and destination overlap in memcpy(0x6777400, 0x6777400,
32)
==906== at 0x4022ED6: memcpy (mc_replace_strmem.c:116)
==906== by 0x83FDED2: _estrndup (zend_alloc.c:2444)
==906== by 0x84286C5: add_assoc_stringl_ex (zend_API.c:1157)
==906== by 0x8274E3F: spl_filesystem_object_get_debug_info
(spl_directory.c:548)
==906== by 0x8361F20: php_var_dump (var.c:128)
==906== by 0x836229C: zif_var_dump (var.c:178)
==906== by 0x845468F: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:315)
==906== by 0x84427B2: execute (zend_vm_execute.h:104)
==906== by 0x841CC2E: zend_execute_scripts (zend.c:1197)
==906== by 0x83C22CC: php_execute_script (main.c:2075)
==906== by 0x84B4C0C: main (php_cli.c:1130)
Reproduce code:
---------------
<?php
$x = new splfileinfo(__FILE__);
try {
$x->openFile(NULL, NULL, NULL);
} catch (Exception $e) { }
var_dump($x->getPathName());
Expected result:
----------------
string(32) "/home/felipe/public_html/bug.php"
Actual result:
--------------
string(32) "e/felipe/public_html/bug.php"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46051&edit=1