[PATCH] D21083: [sanitizer][esan] Add internal_sigaction_syscall

Mike Aizatsky via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 15:23:30 PDT 2016


aizatsky added inline comments.

================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:670
@@ +669,3 @@
+
+int internal_sigaction_syscall(int signum, const void *act, void *oldact) {
+  __sanitizer_kernel_sigaction_t k_act, k_oldact;
----------------
Is the only difference between this and internal_sigaction_norestorer the handling of sa_restorer? Can you eliminate this duplication and reuse the code?

================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:683
@@ +682,3 @@
+    k_act.sa_flags = u_act->sa_flags | SA_RESTORER;
+#if !SANITIZER_ANDROID || !SANITIZER_MIPS32
+    k_act.sa_restorer = u_act->sa_restorer;
----------------
bruening wrote:
> Please elaborate: you're saying there are variables available to get the platform and that's preferable to the preprocessor defines?  These preprocessor defines are what all the surrounding routines are using for this same type of code, so I'm not sure what other method you're suggesting.
Please disregard my comment. #ifs clearly guard fields access for undefined fields I guess.


http://reviews.llvm.org/D21083





More information about the llvm-commits mailing list