From d5b14bb96b324e9229b5b4d4f2a2a323de91928b Mon Sep 17 00:00:00 2001 From: superp00t Date: Sun, 8 Sep 2024 10:53:03 -0400 Subject: [PATCH] feat(system): add abbreviations WHOA_UNSAFE and WHOA_UNSAFE_BOUNDS to disable UBsan entirely or disable automatic bounds checking respectively --- system/Unsafe.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 system/Unsafe.hpp diff --git a/system/Unsafe.hpp b/system/Unsafe.hpp new file mode 100644 index 0000000..c16774d --- /dev/null +++ b/system/Unsafe.hpp @@ -0,0 +1,10 @@ +#ifndef SYSTEM_UNSAFE_HPP +#define SYSTEM_UNSAFE_HPP + +// Abbreviations to disable the UndefinedBehaviorSanitizer + +#define WHOA_UNSAFE __attribute__((no_sanitize("undefined"))) + +#define WHOA_UNSAFE_BOUNDS __attribute__((no_sanitize("bounds"))) + +#endif