Repository navigation
fix(testcomp): the archive's AFL++ phase needs gcc-multilib on the host - #86
Merged
Merged
Conversation
On a clean Ubuntu 24.04 with only python3, the AFL++ binary of the program failed to link: the bundled clang finds no ld, crt1.o, libc or libgcc. The tool does not stop on it -- it skips the fuzzer, gives the whole budget to KLEE and still writes a suite -- so the smoke test passed and every run in the competition would have been KLEE-only. - README: the host needs python3 and gcc-multilib (linker, C runtime and libgcc for 64 and 32 bits); how the engines alternate and what each property's suite holds. - smoketest.sh: fails unless the log shows AFL++ ran (both examples) and KLEE ran (Cover-Branches); the Cover-Branches budget goes from 30 to 60 s, since 30 left KLEE no window. - examples/cover_error.c: defines reach_error, as sv-benchmarks does; an extern-only declaration does not link natively for AFL++. - the wrapper's docstring named the 8.x suite sources. Checked on the rebuilt archive: the smoke test fails on ubuntu:24.04 with only python3, passes with python3 and gcc-multilib on ubuntu:24.04 and 26.04; TestCov 3.11 (the Test-Comp archive) scores the examples' suites TRUE and 100% branch coverage in LP64 and ILP32. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The smoke checks accept pre-launch banners, allowing an engine startup failure to pass when the other engine produces the suite.
1 open issue
What changed in this PR
This PR corrects the Test-Comp archive’s host requirements and strengthens smoke testing to catch silent fallback to KLEE-only execution.
Changes:
- Documents
python3andgcc-multilibrequirements and hybrid test-suite generation. - Adds engine checks to the smoke test and increases the Cover-Branches budget.
- Defines
reach_errorso the Cover-Error example links natively for AFL++.
| File | Description |
|---|---|
| utils/testcomp-archive/smoketest.sh | Adds engine checks and a longer Cover-Branches budget. |
| utils/testcomp-archive/README.txt | Explains host dependencies and hybrid execution. |
| utils/testcomp-archive/make-archive.sh | Updates comments describing host requirements. |
| utils/testcomp-archive/examples/cover_error.c | Defines reach_error for native linking. |
| utils/map2check-testcomp-wrapper.py | Updates documentation of test-suite sources. |
Review effort: Balanced
Comment on lines
+51
to
+54
| AFL++) line="Executing AFL++ with map2check" ;; | ||
| KLEE) line="Executing Klee with map2check" ;; | ||
| esac | ||
| grep -q "$line" "$1/run.log" || fail "$1" "$2: $3 did not run" |
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Running the Test-Comp archive as its README says, on a clean
ubuntu:24.04with onlypython3(whatmap2check.ymlasked for), showed that AFL++ never ran:ld,crt1.o/crti.o,libc/libmorlibgccon the host;A second defect hid behind it:
examples/cover_error.cdeclaredreach_erroronly asextern. KLEE accepts that; the native AFL++ link does not. sv-benchmarks always defines it.Changes:
python3andgcc-multilib(linker, C runtime and libgcc for 64 and 32 bits). It now also explains how the engines alternate and what each property's suite holds (up to 50 cases for Cover-Branches, half at most from the fuzzer's corpus).smoketest.sh: fails unless the log shows that AFL++ ran (both examples) and KLEE ran (Cover-Branches). The Cover-Branches budget goes from 30 to 60 s, since with 30 KLEE got no window; the run still ends in seconds.examples/cover_error.c: definesreach_error, as sv-benchmarks does.klee_log.csv,klee-last/*.ktest).The FM-Tools entry gets
gcc-multilibinrequired_ubuntu_packages(submission side, not in this repo). It is the smallest set that works:--no-install-recommends)python3ldpython3 binutils-lc,-lgccpython3 gccScrt1.o,crti.opython3 gcc-multilibEarlier official validations (V99, V99c) ran in images with
gcc, so their numbers reflect AFL++ active.Test plan
The archive was rebuilt from this branch with
install_pr73, whose code isdevelop's. Result: 693 files; license coverage passes; md5a01c28c57f6f184c4a55809d4271c09c.smoketest.shonubuntu:24.04with onlypython3: fails with "AFL++ did not run" (negative check)smoketest.shonubuntu:24.04withpython3 gcc-multilib: passes in 8 ssmoketest.shonubuntu:26.04(the FM-Tools CI image) withpython3 gcc-multilib: passes in 6 s🤖 Generated with Claude Code