unread
Not sure why this didn't get through..
----- Original Message -----
Hi,
@@ -1216,7 +1216,7 @@
p = php_stream_mmap_range(src, php_stream_tell(src),
maxlen, PHP_STREAM_MAP_MODE_SHARED_READONLY, &mapped);
if (p) {
if (p && mapped) { *buf = pemalloc_rel_orig(mapped + 1, persistent); if (*buf) {
I don't think this "fix" is correct. With your patch, PHP will do more 2
syscalls without any reason (because PHP will try to read the file again).
Anyway, I don't get any memory leak without your patch (at least with PHP
5.2). And take a look at _php_stream_passthru() or
_php_stream_copy_to_stream(). If your patch is correct, these function
would also need to be patched. Again, I get zero leaks.Nuno