Skip to content

Commit 5c322cb

Browse files
committed
Disable opcache for fuzzer-execute
Opcache is now always available and implicitly enabled through opcache.enable. Opcache is already mostly covered through the tracing JIT fuzzer, so keep it disabled here.
1 parent 17826d3 commit 5c322cb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

sapi/fuzzer/fuzzer-execute.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
3131
}
3232

3333
int LLVMFuzzerInitialize(int *argc, char ***argv) {
34-
fuzzer_init_php_for_execute(NULL);
34+
char ini_buf[512];
35+
snprintf(ini_buf, sizeof(ini_buf),
36+
"opcache.enable=0\n");
37+
38+
/* Hint: If opcache is ever enabled, opcache.validate_timestamps=0 needs to
39+
* be set. Otherwise, obtaining the timestamp will fail and the script will
40+
* not be cached. */
41+
42+
fuzzer_init_php_for_execute(ini_buf);
3543
return 0;
3644
}

0 commit comments

Comments
 (0)