Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ASAN] Turn off asan instrumentation in segv handler (#46377)
There's some issues around asan and segv handlers. The issues I'm aware of is: 1. If things run on the sigaltstack, we need to at some point unpoison the sigaltstack and it's not clear when to do that. 2. Sanitizers accidentally free stil-in-use stack frames: google/sanitizers#1561 3. If noreturn functions run on the sigaltstack, asan can get confused about what it needs to unpoison So for now, remove asan instrumentation from the segv_handler and the the jl_call_in_ctx functions (jl_sig_throw is already annotated). This helps the case I was seeing (where gc_srub would cause frequent segv_handler invocations for safe restore), but there's probably a few other landmines remaining here.
- Loading branch information
4af9674
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more PkgEval development, now with support for customizing the build command and e.g. running an ASAN build:
@nanosoldier
runtests(["Example"], buildcommands="contrib/asan/build.sh . install", julia_binary="julia-debug")
4af9674
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, botched the invocation:
@nanosoldier
runtests(["Example"], configuration = (buildcommands="contrib/asan/build.sh . install", julia_binary="julia-debug"))
4af9674
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your package evaluation job has completed - no issues were detected. A full report can be found here.
4af9674
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch...
I don't remember ASAN builds being that slow. A result of the generated code being sanitized now, @Keno?
4af9674
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
4af9674
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to introduce a flag to disable the sanitizer passes so that it is viable to run PkgEval with ASAN? I would guess that memory errors are much more likely in our runtime than they are in generated code.