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

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -