[PATCH] D37792: [compiler-rt] Add siginfo into SignalContext

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 10:59:52 PDT 2017


alekseyshl added inline comments.


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_common.h:799
+  void *siginfo;
   void *context;
   uptr addr;
----------------
We never own or outlive those two pointers, right? Can you add a comment explaining that to the ctor?


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_common.h:808
 
-  SignalContext(void *context, uptr addr, uptr pc, uptr sp, uptr bp,
-                bool is_memory_access, WriteFlag write_flag)
-      : context(context),
+  SignalContext(void *siginfo, void *context, uptr addr, uptr pc, uptr sp,
+                uptr bp, bool is_memory_access, WriteFlag write_flag)
----------------
Make it private.


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_common.h:828
+  // Type of signal e.g. SIGSEGV or EXCEPTION_ACCESS_VIOLATION.
+  int Get() const;
+
----------------
Then let's call it GetType() or GetSignalType()


https://reviews.llvm.org/D37792





More information about the llvm-commits mailing list