- Fixed bug #27397 (debug_backtrace() not showing function arguments). (Zeev)
- Fixed bug #27283 (The last catch statement was sometimes skipped). (Andi)
- Fixed bug #26441 (When __set() returned a value it corrupted it). (Andi)
+- Fixed bug #19749 (shouldn't mmap() files larger than memory_limit). (Wez)
18 March 2004, PHP 5 Release Candidate 1
- Fixed numerous bugs with the just-in-time auto-global initialization, that
range.mode = mode;
range.mapped = NULL;
- /* TODO: Enforce system policy and limits for mmap sizes ? */
+ /* For now, we impose an arbitrary 1MB limit to avoid
+ * runaway swapping when large files are passed thru. */
+ if (length > 1 * 1024 * 1024) {
+ return NULL;
+ }
if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_MMAP_API, PHP_STREAM_MMAP_MAP_RANGE, &range)) {
if (mapped_len) {