-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
LLVM SanitizerCoverage support? #50044
Comments
Yes I think that would be a welcomed addition. I long wanted to have support for tsan in a similar addition. We will have to talk about how this interacts with cached object files / multi-versioning. cc: @pchintalapudi |
Great to hear! I'm going to take a look then... |
Two observations so far:
(8533a1c#diff-8186bd96ba9aaa52f867b0e1d5e203800b1d15c4f2c2d8b332bb120744b7da85R761-R762)
|
1 should be solved by turning on JITLink (in src/jitlayers.h), 2 may need 1 or 2 new JITDylib linked in the correct order to allow overriding. |
Looking at that file, i see the point.
Yeah, that's the rough plan i guess. |
I think if you want a sancov-capable build there should be a flag that turns on JITLink, but then also does the runtime check for the sancov flag. Turning on JITLink on your chosen platform shouldn't harm the JIT (and if it does, we'd like to hear about it) unless the platform isn't supported by JITLink. |
... which would be default-on. |
Ok, with output
|
|
And you can use the environment variable JULIA_LLVM_ARGS to pass flags like
you would to opt. IIRC JITLink has some options to get more information.
|
(thank you, i'm aware of those tricks, that was more of a rhetorical question) |
FTR, here's the complete output of:
|
I wonder if we could just uniquify section names for all LLVM IR globals? Or is that generally undesired in Julia? |
What do you mean by that? Maybe @lhames as an idea. |
Effectively, the same what |
Would it be considered acceptable to add (at least a) a front-end switch (
julia --sanitizer-coverage
?)to control insertion of said pass into the LLVM pass pipeline (close to where sanitizer passes are handled)?
The long story is, i have a C++ codebase, and in my expirience, having more than one implementation
is paramount to weeding-out various issues, so i'm somewhat interested in having a second implementation
of said codebase. But just having a second implementation isn't sufficient, the key is to be able to compare
their externally-observable side-effects, and fuzzing is rather invaluable there, and that strongly suggests
AOT compilation and guided fuzzing, and thus coverage is needed (thus, subj).
The text was updated successfully, but these errors were encountered: