From 51742203a8038793a1c3842d245dd5946a95873f Mon Sep 17 00:00:00 2001 From: Edmond <1571649+edmonddantes@users.noreply.github.com> Date: Thu, 9 Jul 2026 11:24:54 +0000 Subject: [PATCH] fix(fuzz): link http_protocol_handlers.c + grpc.c into embedded harnesses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fuzz_http1_parser / fuzz_h2_session failed at link time — http_parser.c's on_headers_complete calls http_request_classify_protocols and http_request_body_must_buffer (src/core/http_protocol_handlers.c), which in turn calls grpc_request_mode (src/grpc/grpc.c). Neither TU was in the harness source list, so the CI 'Fuzz embedded' job was red at link. Both TUs are self-contained (PHP-core symbols only, no server-side deps), so add them to HTTP1_SRC and H2_SRC rather than stubbing — the fuzzer now exercises real gRPC classification. Verified: both harnesses build and link; fuzz_http1_parser runs 50 iterations clean (cov 91->255, no crash). --- fuzz/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fuzz/Makefile b/fuzz/Makefile index a5687cc3..c661b8a0 100644 --- a/fuzz/Makefile +++ b/fuzz/Makefile @@ -31,6 +31,8 @@ MULTIPART_SRC = ../src/formats/multipart_parser.c HTTP1_SRC = \ ../src/http1/http_parser.c \ ../src/core/body_pool.c \ + ../src/core/http_protocol_handlers.c \ + ../src/grpc/grpc.c \ ../src/formats/multipart_parser.c \ ../src/formats/multipart_processor.c \ ../src/http_param_parse.c \ @@ -63,6 +65,8 @@ H2_SRC = \ ../src/http2/http2_stream.c \ ../src/http1/http_parser.c \ ../src/core/body_pool.c \ + ../src/core/http_protocol_handlers.c \ + ../src/grpc/grpc.c \ ../src/formats/multipart_parser.c \ ../src/formats/multipart_processor.c \ ../src/http_param_parse.c \