[PATCH] D69045: libhwasan interceptor ABI intercept longjmp/setjmp
Matthew Malcomson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 12 08:34:57 PDT 2020
mmalcomson added a comment.
In D69045#2030063 <https://reviews.llvm.org/D69045#2030063>, @eugenis wrote:
> According to https://github.com/google/sanitizers/issues/1244, there is a non-interceptable _setjmp in __libc_start_main that is later jumped to in pthread_exit.
> It seems to break this approach.
> Any idea what to do? Detect that jmpbuf is not a hwasan jmpbuf and bail out? This is happening at the very end of a thread's life, so hopefully it should not matter that the stack in not untagged.
Well that's unfortunate ...
I'd thought I'd checked that any non-interceptable `setjmp`s or `longjmp`s would come in pairs so that a buffer set by glibc would be read by glibc.
(FWIW this particular `setjmp` can be intercepted in glibc 2.31 -- so hopefully as time goes on this will be less of a problem).
I think your idea of just avoiding buffers that aren't from HWASAN makes sense -- especially since the interceptor mode is not the main focus.
Just to set expectations: I expect I'll only find time to fix this next month (pretty busy in the near future).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69045/new/
https://reviews.llvm.org/D69045
More information about the llvm-commits
mailing list