我们使用以下代码来确定是否-fsanitize=address
已在编译时为 clang 和 gcc 指定。我们如何确定是否-fsanitize=undefined
已指定?
bool isSanitized = false;
#if defined(__has_feature)
#if __has_feature(address_sanitizer)
isSanitized = true;
#endif
#elif defined(__SANITIZE_ADDRESS__)
isSanitized = true;
#endif