Skip to content

docs(aflpp): add opinionated environment variables guide#130

Merged
GrosQuildu merged 3 commits intotrailofbits:mainfrom
xr843:feat/aflpp-env-vars-guide
Mar 27, 2026
Merged

docs(aflpp): add opinionated environment variables guide#130
GrosQuildu merged 3 commits intotrailofbits:mainfrom
xr843:feat/aflpp-env-vars-guide

Conversation

@xr843
Copy link
Copy Markdown
Contributor

@xr843 xr843 commented Mar 21, 2026

Summary

Closes #18

Adds a practical "Environment Variables That Matter" section to the AFL++ skill, based on real-world fuzzing experience. Rather than duplicating the official docs, this provides opinionated guidance on which variables to use and why.

Sections Added

Section Variables Rationale
Always Set AFL_TMPDIR, AFL_FAST_CAL Free performance wins with no downsides
Multi-Core AFL_FINAL_SYNC, AFL_TESTCACHE_SIZE Prevent missed paths, improve sharing
CI/Automated AFL_EXIT_ON_TIME, AFL_EXIT_WHEN_DONE, AFL_NO_UI Bounded fuzzing for CI pipelines
Avoid AFL_NO_ARITH, AFL_SHUFFLE_QUEUE, AFL_DISABLE_TRIM Usually harmful or unnecessary

Placement

Inserted between "Running Campaigns" and "Multi-Core Fuzzing" sections — after the user knows how to run AFL++ but before they scale up.

Follow-up from PR #15 review feedback.

@xr843 xr843 requested review from GrosQuildu and dguido as code owners March 21, 2026 23:34
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 21, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@GrosQuildu GrosQuildu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! Some comments from me:

AFL_FAST_CAL - docs says to use it for slow targets
AFL_FINAL_SYNC - this is only important for cmin, unless I miss something? Current description sounds like the fuzzing itself could be harmed when this envvar is missing
AFL_TESTCACHE_SIZE - I would mention that default is 50 MB and the "good values" are in range 50-250

AFL_NO_ARITH - docs mention it may be useful for fuzzing test-based formats. Sounds about right, we shouldn't discourage people from using it without a note.

@xr843
Copy link
Copy Markdown
Contributor Author

xr843 commented Mar 24, 2026

Thanks for the thorough review @GrosQuildu! All points addressed:

  • AFL_FAST_CAL: Clarified it's recommended for slow targets, removed the "every campaign" language
  • AFL_FINAL_SYNC: Corrected the description — scoped to afl-cmin corpus minimization instead of implying fuzzing itself is affected
  • AFL_TESTCACHE_SIZE: Added default value (50 MB) and recommended range (50-250)
  • AFL_NO_ARITH: Updated to note it may help for text-based formats instead of blanket discouragement

@xr843
Copy link
Copy Markdown
Contributor Author

xr843 commented Mar 26, 2026

Friendly ping — this PR is ready for review. Happy to make any changes needed. 🙏

@xr843
Copy link
Copy Markdown
Contributor Author

xr843 commented Mar 26, 2026

Thanks for the review, @GrosQuildu! I've pushed a fix addressing all four points:

  • AFL_FAST_CAL: Moved out of "Always Set These" into its own "Slow Targets" subsection to make it clear this is specifically recommended for slow targets, not a universal setting.
  • AFL_FINAL_SYNC: Reworded to clarify it does not affect the fuzzing process itself — it only matters for afl-cmin corpus minimization afterward.
  • AFL_TESTCACHE_SIZE: Explicitly mentions the 50 MB default and 50-250 MB recommended range.
  • AFL_NO_ARITH: Softened wording — now notes it "may be useful for text-based targets" rather than making it sound purely negative.

@GrosQuildu
Copy link
Copy Markdown
Contributor

Thanks

xr843 and others added 3 commits March 27, 2026 11:02
Add a practical "Environment Variables That Matter" section covering:
- Always-set variables (AFL_TMPDIR, AFL_FAST_CAL) for free perf wins
- Multi-core campaign variables (AFL_FINAL_SYNC, AFL_TESTCACHE_SIZE)
- CI/automated fuzzing variables (AFL_EXIT_ON_TIME, AFL_NO_UI)
- Variables to avoid (AFL_NO_ARITH, AFL_SHUFFLE_QUEUE, AFL_DISABLE_TRIM)

Follow-up from PR trailofbits#15 review feedback.

Closes trailofbits#18
- AFL_FAST_CAL: clarify it's recommended for slow targets, not universal
- AFL_FINAL_SYNC: correct scope to afl-cmin corpus minimization
- AFL_TESTCACHE_SIZE: add default (50 MB) and recommended range (50-250)
- AFL_NO_ARITH: note it may help for text-based formats
- AFL_FAST_CAL: move to its own "Slow Targets" section to clarify it's
  specifically recommended for slow targets, not always
- AFL_FINAL_SYNC: clarify it only matters for afl-cmin corpus
  minimization, not for the fuzzing process itself
- AFL_TESTCACHE_SIZE: mention default is 50 MB and good range is 50-250 MB
- AFL_NO_ARITH: soften wording to note it may be useful for text-based targets

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@GrosQuildu GrosQuildu force-pushed the feat/aflpp-env-vars-guide branch from bd41147 to 8595dda Compare March 27, 2026 10:02
@GrosQuildu GrosQuildu merged commit 4b9a4e9 into trailofbits:main Mar 27, 2026
4 checks passed
@xr843 xr843 deleted the feat/aflpp-env-vars-guide branch March 27, 2026 11:45
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.

Add opinionated environment variables guide to AFL++ skill

3 participants