. Fixed bug #74658 (Undefined constants in array properties result in broken
properties). (Laruence)
+- Opcache:
+ . Fixed bug #74663 (Segfault with opcache.memory_protect and
+ validate_timestamp). (Laruence)
+
- SPL:
. Fixed bug #74478 (null coalescing operator failing with SplFixedArray).
(jhdxr)
}
}
+int validate_timestamp_and_record_ex(zend_persistent_script *persistent_script, zend_file_handle *file_handle)
+{
+ int ret;
+
+ SHM_UNPROTECT();
+ ret = validate_timestamp_and_record(persistent_script, file_handle);
+ SHM_PROTECT();
+
+ return ret;
+}
+
/* Instead of resolving full real path name each time we need to identify file,
* we create a key that consist from requested file name, current working
* directory, current include_path, etc */
void zend_accel_schedule_restart_if_necessary(zend_accel_restart_reason reason);
accel_time_t zend_get_file_handle_timestamp(zend_file_handle *file_handle, size_t *size);
int validate_timestamp_and_record(zend_persistent_script *persistent_script, zend_file_handle *file_handle);
+int validate_timestamp_and_record_ex(zend_persistent_script *persistent_script, zend_file_handle *file_handle);
int zend_accel_invalidate(const char *filename, int filename_len, zend_bool force);
int zend_accel_script_optimize(zend_persistent_script *persistent_script);
int accelerator_shm_read_lock(void);
--- /dev/null
+--TEST--
+Bug #74663 (Segfault with opcache.memory_protect and validate_timestamp)
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.file_update_protection=0
+opcache.enable_file_override=1
+opcache.validate_timestamps=1
+opcache.revalidate_freq=0
+opcache.protect_memory=1
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$file = __DIR__ . "/bug74663.inc";
+file_put_contents($file, "");
+include $file;
+
+var_dump(is_file($file));
+?>
+--CLEAN--
+<?php
+unlink(__DIR__ . "/bug74663.inc");
+--EXPECT--
+bool(true)
handle.type = ZEND_HANDLE_FILENAME;
if (ZCG(accel_directives).validate_timestamps) {
- return validate_timestamp_and_record(persistent_script, &handle) == SUCCESS;
+ return validate_timestamp_and_record_ex(persistent_script, &handle) == SUCCESS;
}
return 1;