[PATCH] The msan interface stubs for non-instrumented code were missing a bunch of entry points.

Chandler Carruth chandlerc at gmail.com
Wed Feb 19 16:16:34 PST 2014


Hi eugenis,

The msan interface stubs for non-instrumented code were missing a bunch of entry points. I'm not really sure this is the right pattern, but there is no reason to be inconsistent. If we're providing the interface stubs when not instrumenting code with msan we should provide all of them rather than a subset.

I'm not aware of any testing for this code path, but if you guys can point me at testing for it I'll happily add some tests.

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

Files:
  include/sanitizer/msan_interface.h

Index: include/sanitizer/msan_interface.h
===================================================================
--- include/sanitizer/msan_interface.h
+++ include/sanitizer/msan_interface.h
@@ -148,10 +148,18 @@
 #define __msan_test_shadow(x, size) ((intptr_t)-1)
 #define __msan_set_exit_code(exit_code)
 #define __msan_set_expect_umr(expect_umr)
+#define __msan_set_keep_going(keep_going);
 #define __msan_print_shadow(x, size)
 #define __msan_print_param_shadow()
 #define __msan_has_dynamic_component() (0)
 #define __msan_allocated_memory(data, size)
+#define __msan_get_estimated_allocated_size(size) ((size_t) 0)
+#define __msan_get_ownership(p) (0)
+#define __msan_get_allocated_size(p) ((size_t) 0)
+#define __msan_get_current_allocated_bytes() ((size_t) 0)
+#define __msan_get_heap_size() ((size_t) 0)
+#define __msan_get_free_bytes() ((size_t) 0)
+#define __msan_get_unmapped_bytes() ((size_t) 0)
 
 #endif   // __has_feature(memory_sanitizer)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2836.1.patch
Type: text/x-patch
Size: 955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140219/a680fea6/attachment.bin>


More information about the llvm-commits mailing list