#include "sanitizer_common/sanitizer_common.h"
#include "sanitizer_common/sanitizer_flags.h"
#include "sanitizer_common/sanitizer_flag_parser.h"
+#include "sanitizer_common/sanitizer_forward_calls.h"
#include "ubsan/ubsan_flags.h"
#include "ubsan/ubsan_platform.h"
Report("WARNING: strchr* interceptors are enabled even though "
"replace_str=0. Use intercept_strchr=0 to disable them.");
}
+#if SANITIZER_CALLS_FORWARDING
+ if (!common_flags()->enable_interceptors) {
+ VReport(2, "WARNING: glibc interceptors deactivated, use "
+ "enable_interceptors=1 to enable them.\n");
+ }
+#endif
}
} // namespace __asan
#if SANITIZER_CALLS_FORWARDING
InitializeMallocInterceptors();
InitializeNewDeleteInterceptors();
+ if (!common_flags()->enable_interceptors)
+ __sanitizer_disable_interceptors();
#endif
VReport(1, "AddressSanitizer: libc interceptors initialized\n");
"(asan, ubsan and lsan only).")
COMMON_FLAG(bool, html_cov_report, false, "Generate html coverage report.")
COMMON_FLAG(const char *, sancov_path, "sancov", "Sancov tool location.")
+COMMON_FLAG(bool, enable_interceptors, true,
+ "If unset, uses glibc calls forwarding around interceptors.")