c++ - How can I determine if UBSAN has been compiled in using clang or gcc? -
we use following code determine if -fsanitize=address has been specified @ compile time clang , gcc. how determine if -fsanitize=undefined has been specified?
bool issanitized = false; #if defined(__has_feature) #if __has_feature(address_sanitizer) issanitized = true; #endif #elif defined(__sanitize_address__) issanitized = true; #endif
i suggest file bug asan github (or gcc bugzilla) (we have defined asan , tsan makes sense cook 1 ubsan well). seems option pass custom define -fsanitize-undefined in makefile.
Comments
Post a Comment