Skip to content

lwan: fix broken build#50

Open
tc-agent wants to merge 2 commits into
masterfrom
lwan-fix-broken-build
Open

lwan: fix broken build#50
tc-agent wants to merge 2 commits into
masterfrom
lwan-fix-broken-build

Conversation

@tc-agent

@tc-agent tc-agent commented May 9, 2026

Copy link
Copy Markdown
Owner

Why

The fuzzer build last succeeded on 2026-04-23 (build status dashboard, Fuzz Introspector). Daily builds since have all failed at the compile step in src/lib/lwan-straitjacket.c:

error: use of undeclared identifier 'LANDLOCK_ACCESS_FS_IOCTL_DEV'
error: use of undeclared identifier 'LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET'
error: use of undeclared identifier 'LANDLOCK_SCOPE_SIGNAL'
error: no member named 'scoped' in 'struct landlock_ruleset_attr'

Lwan landed Landlock support in 3cb40844 on the same date. The base-builder image (base-builder:ubuntu-24-04) ships kernel 6.8 headers, which lack symbols introduced in Linux 6.10 (LANDLOCK_ACCESS_FS_IOCTL_DEV) and 6.12 (LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET, LANDLOCK_SCOPE_SIGNAL, scoped struct member). lwan-straitjacket.c uses these unconditionally under LWAN_HAVE_LANDLOCK.

The coverage build also currently fails at the same compile step with the same errors. Its last_successful_build (2025-04-22) is older than the public log retention window, so this fix addresses the currently visible failure but cannot verify whether a separate prior issue exists.

What

Patch CMake at build time to remove the find_path(LANDLOCK_HEADER ...) block, which keeps LWAN_HAVE_LANDLOCK undefined and skips the offending code. The fuzz harnesses (config_fuzzer, h2_huffman_fuzzer, pattern_fuzzer, request_fuzzer, template_fuzzer) target lwan's parsers (config, HTTP/2 Huffman, glob patterns, HTTP requests, templates); the sandboxing code path is not on any harness's reachable graph.

Coverage after fix (5 min/harness, libfuzzer + ASan)

harness lines functions
config_fuzzer 1142 (9.5%) 113 (14.2%)
h2_huffman_fuzzer 793 (6.6%) 60 (7.6%)
pattern_fuzzer 700 (5.8%) 58 (7.3%)
request_fuzzer 1496 (12.4%) 133 (16.8%)
template_fuzzer 1327 (11.0%) 127 (16.0%)
total 3322 (27.5%) 284 (35.6%)

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

Fuzzing Coverage Report

Tested: project lwan · base c4ba43b → head 9d4fbc2 · 300s total fuzz budget · updated 2026-05-28 05:39 UTC · workflow run

Metric Before After Delta
Static reachability 29.7% (233/784) 29.7% (233/784) +0.0%
Line coverage 28.4% (3474/12221) 28.0% (3418/12221) -1.6%
Branch coverage 27.0% (1724/6396) 26.5% (1694/6396) -1.7%
Function coverage 35.8% (286/800) 35.4% (283/800) -1.0%

Per-harness

Harness Lines before Lines after Δ
config_fuzzer 10.8% (1311/12179) 10.7% (1305/12179) -0.5%
h2_huffman_fuzzer 8.0% (973/12144) 8.0% (973/12144) +0.0%
pattern_fuzzer 7.2% (880/12162) 7.2% (880/12162) +0.0%
request_fuzzer 14.0% (1697/12144) 13.7% (1667/12144) -1.8%
template_fuzzer 12.1% (1470/12156) 11.9% (1450/12156) -1.4%

Δ = (after − before) / before, to accommodate that denominators may change. "new" when before is 0; "deleted" when after is 0.

@tc-agent
tc-agent force-pushed the master branch 10 times, most recently from 5610e75 to 6c52918 Compare May 9, 2026 08:46
@tc-agent
tc-agent force-pushed the master branch 17 times, most recently from 5573df7 to 9a36aa8 Compare May 21, 2026 05:13
@tc-agent
tc-agent force-pushed the master branch 4 times, most recently from 6125235 to e512e7e Compare May 27, 2026 06:33
@tc-agent
tc-agent force-pushed the lwan-fix-broken-build branch from ae6c8bb to ddd467a Compare May 27, 2026 06:43
@tc-agent
tc-agent force-pushed the master branch 5 times, most recently from b5fd10c to 712a52f Compare May 27, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant