OSS-Fuzz fuzz build fails in cgi_test.go and frankenphp.go
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- docker, go
- Domain
- build-system, testing
Research direction
Start with cgi_test.go and frankenphp.go, then reproduce the failure using the OSS-Fuzz build_image and build_fuzzers commands in the issue. Remove the benchmark function from cgi_test.go and add the missing os import to frankenphp.go; confirm the fuzz targets compile with the fuzzing build and check_build.
Written by the indexing model from the issue text.
Description
What happened?
The FrankenPHP OSS-Fuzz fuzz build fails while compiling the Go fuzz targets. The failure occurs in the fuzzing build, before the fuzzers can be produced. The reported errors include missing references to testing.B in the generated cgi_test.go_fuzz.go file and to os in frankenphp.go. The affected code contains a benchmark function in cgi_test.go:
func BenchmarkSplitRawHeader(b *testing.B) {
...
}
This benchmark is not required by the fuzz targets but is included in the fuzzing build transformation. The fuzz build does not provide the benchmark testing context required by this function.
The failure also indicates that frankenphp.go uses the os package without the corresponding import.
The issue can be reproduced with the OSS-Fuzz build command:
python infra/helper.py build_image frankenphp
python infra/helper.py build_fuzzers \
--sanitizer address \
--engine libfuzzer \
--architecture x86_64 \
frankenphp
Expected behavior: the FrankenPHP fuzz targets should compile successfully.
The fix removes the benchmark function from cgi_test.go and adds the missing os import to frankenphp.go. The patch was successfully verified with the OSS-Fuzz fuzzing build and check_build.
Build Type
Docker (Debian Trixie)
Worker Mode
No
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
phpinfo() output
Not applicable. The failure occurs during the OSS-Fuzz fuzz-target build before a FrankenPHP runtime instance is started, so no phpinfo() output is available.
Relevant log output
Relevant log output
The fuzz build reported missing references to testing.B in cgi_test.go_fuzz.go and os in frankenphp.go. The build then failed during fuzz-target compilation.
- Dominant language
- Go
- Stars
- 11.5k
- Forks
- 510
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 69
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from php/frankenphp
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
php/frankenphp#2829 ·
Maintainers usually reply within 1 day
-
Considerer documenting / disabling MPTCP by default due to CVE-2026-98432Possibly taken @dajiaohuang claimed this 4 days ago. Openenhancement
Difficulty 1/5 Under an hour Newbie friendliness 78/100
php/frankenphp#2806 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
php/frankenphp#2671 · 1 comment ·
Maintainers usually reply within 1 day
-
Include frankenphp version in logsMay be free again A pull request for this issue was closed without being merged. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
php/frankenphp#2483 · 3 comments ·
Maintainers usually reply within 1 day
-
suggestion about compile.mdMay be free again A pull request for this issue was closed without being merged. Openenhancement
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
php/frankenphp#601 · 5 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
teradata-labs/loom#624 ·
Maintainers usually reply within 1 day
-
enhancement ruby
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
open-telemetry/opentelemetry-lambda#2741 ·
Maintainers usually reply within 2 days