OSS-Fuzz fuzz build fails in cgi_test.go and frankenphp.go

オープン
#2,822 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
docker, go

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

bug
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.

Image
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.
主要言語
Go
スター
11.5k
フォーク
510
平均マージ
1日 7時間
マージ済み PR(30日)
71

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

php/frankenphp のほかの issue

php/frankenphp の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。