summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-10-30 13:15:05 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-10-31 09:37:05 +0100
commit333d607d47ca6eec96637c1c8686591dec6f5a0b (patch)
tree8ee5d839de1409cf63b0021936db796bb3951f42 /ext/reflection/php_reflection.c
parent0055f1e3dc7ec27778d6d3bd22404319b3ceeeca (diff)
downloadphp-git-333d607d47ca6eec96637c1c8686591dec6f5a0b.tar.gz
Fix bug #77930: Remove mmap limit
First, the limitation already doesn't trigger if you copy the whole file (i.e. use copy() or stream_copy_to_stream() and don't specify a length). This happens because length will be 0 at the time of the check and only later calculated based on the file size. This means that we're already completely blowing the length limit for what is likely the most common case, and it doesn't seem like anyone complained about that. Second, the premise of the code comment ("to avoid runaway swapping") seems incorrect to me. Because this performs a file-backed non-private mmap, no swap backing is needed for the mapping. Concerns over "memory usage" are also misplaced, as this is a virtual mapping.
Diffstat (limited to 'ext/reflection/php_reflection.c')
0 files changed, 0 insertions, 0 deletions