[PATCH] D32457: [asan] Don't reset non-default user handler if allow_user_signal_handler is true.

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 14:07:21 PDT 2017


vitalybuka added inline comments.


================
Comment at: test/asan/TestCases/Linux/preinstalled_signal.cc:36
+  void (*restorer)();
+  sigset_t mask;
+};
----------------
eugenis wrote:
> AFAIK sigset_t and kernel_sigset_t may be different in size.
> Look in sanitizer_platform_limits_posix.h
I don't use it.


================
Comment at: test/asan/TestCases/Linux/preinstalled_signal.cc:41
+extern "C" void restorer();
+asm("restorer:mov $15,%rax\nsyscall");
+#endif
----------------
eugenis wrote:
> Maybe limit the test to x86/x86_64? There are just too many things that can go wrong on different platforms.
I'd limit if we see failures.
On a quick look into kernel code, arm should handle calls without restorer, mips and powerpc does not check this field at all.



================
Comment at: test/asan/TestCases/Linux/preinstalled_signal.cc:47
+#if defined(__x86_64__)
+    act->flags |= 0x04000000;
+    act->restorer = &restorer;
----------------
eugenis wrote:
> is that SA_RESTORER?
Yes, but I don't see headers defining it


https://reviews.llvm.org/D32457





More information about the llvm-commits mailing list