Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add split-switches-pass to AFL++ instrumentation #554

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

R9295
Copy link
Contributor

@R9295 R9295 commented Nov 19, 2024

the split-switches-pass was missing for AFL++'s cmplog instrumentation. And also, the order of the passes matters so I re-ordered them in the same order as AFL++'s afl-cc.c

@smoelius
Copy link
Member

Thanks!

I re-ordered them in the same order as AFL++'s afl-cc.c

Could you point me to the lines in that file you are using to determine the order? It will be helpful for others who find this PR, and for future contributors should additional passes need to be added.

@vanhauser-thc
Copy link
Contributor

Lgtm thanks for fixing aarnav

-Z llvm-plugins={p}/cmplog-switches-pass.so \
-Z llvm-plugins={p}/split-switches-pass.so \
-Z llvm-plugins={p}/SanitizerCoveragePCGUARD.so \
Copy link
Member

Choose a reason for hiding this comment

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

Sorry if this is a dumb question, but how did you choose where in the order to put this plugin (SanitizerCoveragePCGUARD.so)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

the order is the correct one. first cmplog should know about the switch compare, then we split the switches so the coverage can easily see the differences in comparing the switches - then the coverage instrumentation. later the instrumentations of integer/float/string/pointer comparisons.

@smoelius smoelius added this pull request to the merge queue Nov 20, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 20, 2024
@R9295
Copy link
Contributor Author

R9295 commented Nov 20, 2024

@smoelius I think this is a bug in the latest nightly. experiencing this on another project too, locally.

@smoelius
Copy link
Member

@smoelius I think this is a bug in the latest nightly. experiencing this on another project too, locally.

Can I ask which one?

re-order AFL++ passess because order matters
@smoelius smoelius enabled auto-merge November 20, 2024 11:16
@smoelius smoelius added this pull request to the merge queue Nov 20, 2024
Merged via the queue into rust-fuzz:master with commit 9c034df Nov 20, 2024
18 checks passed
@smoelius
Copy link
Member

Published in version 0.15.12.

@R9295
Copy link
Contributor Author

R9295 commented Nov 20, 2024

@smoelius I guess you figured out the root cause:
mmastrac/rust-ctor#309

@smoelius
Copy link
Member

@smoelius I guess you figured out the root cause: mmastrac/rust-ctor#309

I'm not sure, TBH.

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.

None yet

3 participants