Commit 29aa33d
committed
fuzz: disable Zend's arena allocator under go-118-fuzz-build
Zend's own arena allocator reuses freed memory in ways that hide bugs
from ASan/MSan; disabling it (USE_ZEND_ALLOC=0) is already required for
the sanitizer CI jobs (.github/workflows/sanitizers.yaml), but that env
var never reaches a libFuzzer binary built by OSS-Fuzz: build.sh runs in
a throwaway build container, and ClusterFuzz later execs the compiled
fuzzer as a fresh process on a different bot with no inherited env. The
libFuzzer .options file can't fill the gap either, since ClusterFuzz
whitelists its [env] section down to two unrelated variables.
Setting it from an init() gated on the "gofuzz" build tag reaches the
process before PHP starts, without touching any non-fuzzing build.1 parent 6845134 commit 29aa33d
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments