[HWASan] Catch cases where libc populated jmp_buf.
Some setjmp calls within libc cannot be intercepted while their matching longjmp calls can be. This causes problems if our setjmp/longjmp interceptors don't use the exact same format as libc for populating and reading the jmp_buf. We add a magic field to our jmp_buf and populate it in setjmp. This allows our longjmp interceptor to notice when a libc jmp_buf is passed to it. See discussion on https://reviews.llvm.org/D109699 and https://reviews.llvm.org/D69045. Fixes https://github.com/google/sanitizers/issues/1244. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D109787
Loading
Please sign in to comment