|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-08-02 04:28 UTC] laruence@php.net
[2012-08-02 04:28 UTC] laruence@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: laruence
[2012-08-02 04:28 UTC] laruence@php.net
[2012-08-02 04:31 UTC] laruence@php.net
[2012-08-02 04:32 UTC] laruence@php.net
[2014-10-07 23:23 UTC] stas@php.net
[2014-10-07 23:34 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 21:00:01 2025 UTC |
Description: ------------ In zend_stream.cc the size passed to mmap is the size of the file + ZEND_MMAP_AHEAD. *buf = mmap(0, size + ZEND_MMAP_AHEAD, PROT_READ, MAP_PRIVATE, fileno(file_handle->handle.fp), 0); However, when munmap() is called the incorrect size is passed. static void zend_stream_unmap(zend_stream *stream TSRMLS_DC) { /* {{{ */ #if HAVE_MMAP if (stream->mmap.map) { munmap(stream->mmap.map, stream->mmap.len); } else #endif The call to munmap should be munmap(stream->mmap.map, stream->mmap.len + ZEND_MMAP_AHEAD); Test script: --------------- N/A Expected result: ---------------- N/A Actual result: -------------- N/A