summaryrefslogtreecommitdiffstats
path: root/libsanitizer/include/sanitizer/common_interface_defs.h
diff options
context:
space:
mode:
authorkcc <kcc@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-04 21:33:31 +0000
committerkcc <kcc@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-04 21:33:31 +0000
commit1e80ce4111e28463d870335befe7d99066b5971e (patch)
tree7cfc103c9b6b4ce7ca19d39f91509a1b68819a63 /libsanitizer/include/sanitizer/common_interface_defs.h
parent482026b63e8a488d6b7f0eab53fcbfe12c3309ae (diff)
downloadppe42-gcc-1e80ce4111e28463d870335befe7d99066b5971e.tar.gz
ppe42-gcc-1e80ce4111e28463d870335befe7d99066b5971e.zip
libsanitizer merge from upstream r191666
This may break gcc-asan on Mac, will follow up separately. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204368 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libsanitizer/include/sanitizer/common_interface_defs.h')
-rw-r--r--libsanitizer/include/sanitizer/common_interface_defs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libsanitizer/include/sanitizer/common_interface_defs.h b/libsanitizer/include/sanitizer/common_interface_defs.h
index c218b5b5654..a7db2ff1c12 100644
--- a/libsanitizer/include/sanitizer/common_interface_defs.h
+++ b/libsanitizer/include/sanitizer/common_interface_defs.h
@@ -39,6 +39,16 @@ extern "C" {
// the error message. This function can be overridden by the client.
void __sanitizer_report_error_summary(const char *error_summary);
+ // Some of the sanitizers (e.g. asan/tsan) may miss bugs that happen
+ // in unaligned loads/stores. In order to find such bugs reliably one needs
+ // to replace plain unaligned loads/stores with these calls.
+ uint16_t __sanitizer_unaligned_load16(const void *p);
+ uint32_t __sanitizer_unaligned_load32(const void *p);
+ uint64_t __sanitizer_unaligned_load64(const void *p);
+ void __sanitizer_unaligned_store16(void *p, uint16_t x);
+ void __sanitizer_unaligned_store32(void *p, uint32_t x);
+ void __sanitizer_unaligned_store64(void *p, uint64_t x);
+
#ifdef __cplusplus
} // extern "C"
#endif
OpenPOWER on IntegriCloud