Skip to content

libafl_cc: gate unsupported custom passes on llvm 22#3777

Open
terabyte-trifler wants to merge 1 commit intoAFLplusplus:mainfrom
terabyte-trifler:codex/libafl-3769-llvm22
Open

libafl_cc: gate unsupported custom passes on llvm 22#3777
terabyte-trifler wants to merge 1 commit intoAFLplusplus:mainfrom
terabyte-trifler:codex/libafl-3769-llvm22

Conversation

@terabyte-trifler
Copy link
Copy Markdown

Summary

  • detect LLVM 22+ in libafl_cc and stop trying to build custom passes that are not yet known to be compatible there
  • skip loading those unsupported passes at wrapper runtime with a clear diagnostic instead of failing the whole compiler-wrapper flow
  • document the LLVM 22 support boundary in the libafl_cc README and add a unit test for the pass support matrix

Details

This keeps the maintained cmplog and autotokens pass flow working on newer LLVM releases while avoiding hard build failures from custom LibAFL-specific passes that still need to be ported.

On LLVM 22 and newer, this change skips:

  • function-logging
  • coverage-accounting
  • ctx
  • dump-cfg

Testing

  • cargo test -p libafl_cc

Closes #3769.

@addisoncrump addisoncrump requested a review from tokatoka April 1, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libafl_cc passes are incompatible with LLVM>=22

1 participant