-
-
Notifications
You must be signed in to change notification settings - Fork 324
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 whole-archive feature to libafl_targets #1544
Conversation
Fixes #1540 |
@andreafioraldi is this good to you? |
Fix is somehow incomplete 👻 We are still having some weak symbols not being overridden in fuzzbench. Testing locally, it works, but in Fuzzbench, it doesn't! |
^ This now adds the interceptors explicitly as well. |
|
Dammit 😂 |
I've confirmed that this resolves the linkage issues in https://github.com/AFLplusplus/LibAFL/tree/libfuzzer-best |
Doesn't seem to work on stable then? |
Yeah, sadly there's no way to do this with stable. |
Merge this then? And mark libfuzzer as nightly? |
Need to fix CI but I'm not sure what the problem is? |
maybe
to disable it on stable? |
9e5c847
to
9c25042
Compare
For reference, years ago I solved this with a dynamic list in AFL++ https://github.com/AFLplusplus/AFLplusplus/blob/stable/dynamic_list.txt but ofc you need a compiler wrapper, not our case for rustc I guess |
So... @andreafioraldi merge or no merge? |
422165f
to
4d8b443
Compare
Rebased. |
So ready to merge? |
4d8b443
to
304c5e7
Compare
We shall see 🙂 |
We don't want a dynamic list then? |
* maybe fix linkage? * fix hack CI * interceptors * do not call strstr and friends * format * whoops * enforce nightly; fixup linkage by featuring interceptors * skip libafl_libfuzzer in stable cargo hack check * oops * packed_bundled_libs is stablised
This addresses a very annoying issue with libafl_libfuzzer where linkage drops symbols from libafl_targets. It does this by forcing the rustc linkage step to add all object files from libafl_targets, regardless if they are directly referenced or not. Confirmed with GDB, this does cause
__sanitizer_weak_*cmp
to be linked. This should address the issues we see with performance in e.g. PROJ4: https://www.fuzzbench.com/reports/experimental/2023-09-21-libafl/index.htmlThis is feature-gated as it requires nightly, and the unstable feature cannot be added via rustversion.