[PATCH] TidySigaction in sanitizer_linux

Alexey Samsonov samsonov at google.com
Wed Apr 3 01:01:18 PDT 2013



================
Comment at: lib/sanitizer_common/sanitizer_linux.h:38
@@ +37,3 @@
+// the unused portion of the signal mask.
+int TidySigaction(int signum, const struct sigaction *act,
+                  struct sigaction *oldact);
----------------
I suppose we would need to call TidySigaction() from other tools like ASan?
In this case it needs to go into platform-independent header (smth. like sanitizer_libc.h
with void* arguments) - we call sigaction on Mac as well.

================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:655
@@ +654,3 @@
+  const uptr kKernelSigsetSize = 8;
+  int res = sigaction(signum, act, oldact);
+  if (oldact) {
----------------
Shouldn't this be REAL(sigaction)? Otherwise you'll call intercepted function, which is not nice.

================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:650
@@ -649,1 +649,3 @@
 
+int TidySigaction(int signum, const struct sigaction *act,
+                  struct sigaction *oldact) {
----------------
Again, this impl. should go somewhere like sanitizer_posix.cc


http://llvm-reviews.chandlerc.com/D603



More information about the llvm-commits mailing list