[libunwind] [libunwind] Fix running tests with MSan (PR #67860)
    Louis Dionne via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Tue Oct 17 12:57:53 PDT 2023
    
    
  
================
@@ -115,6 +121,18 @@ extern int unw_set_reg(unw_cursor_t *, unw_regnum_t, unw_word_t) LIBUNWIND_AVAIL
 extern int unw_set_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t)  LIBUNWIND_AVAIL;
 extern int unw_resume(unw_cursor_t *) LIBUNWIND_AVAIL;
 
+#ifdef LIBUNWIND_HAVE_MSAN
+// unw_getcontext is implemented in assembly so it is rather difficult to
+// mark the MSan shadow as initialized from within the function. Instead we
+// use a macro wrapper when compiling with MSan to avoid false-positives.
+#define unw_getcontext(context)                                                \
----------------
ldionne wrote:
I think I'd defer to the libunwind regulars. @MaskRay perhaps?
https://github.com/llvm/llvm-project/pull/67860
    
    
More information about the cfe-commits
mailing list