[compiler-rt] r259741 - [asan] When catching a signal caused by a memory access, print if it's a READ or a WRITE. This touches win/mac files which I have not tested, if a win/mac bot fails I'll try to quick-fix
Roman Divacky via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 7 07:39:05 PST 2016
> Index: projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
> ===================================================================
> --- projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc (revision 260009)
> +++ projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc (working copy)
> @@ -1158,7 +1158,11 @@
> bool GetSigContextWriteFlag(void *context) {
> #if defined(__x86_64__) || defined(__i386__)
> ucontext_t *ucontext = (ucontext_t*)context;
> +#if SANITIZER_FREEBSD
> + return ucontext->uc_mcontext.mc_err & 2;
> +#else
> return ucontext->uc_mcontext.gregs[REG_ERR] & 2;
> +#endif
> #else
> return false; // FIXME: Implement.
> #endif
This looks correct to me.
More information about the llvm-commits
mailing list