feat(system): add abbreviations WHOA_UNSAFE and WHOA_UNSAFE_BOUNDS to disable UBsan entirely or disable automatic bounds checking respectively

This commit is contained in:
phaneron 2024-09-08 10:53:03 -04:00
parent 8eba4c3ff0
commit d5b14bb96b

10
system/Unsafe.hpp Normal file
View file

@ -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