diff --git a/py/plugins/gcc.py b/py/plugins/gcc.py index 5834a472..8b66d83f 100644 --- a/py/plugins/gcc.py +++ b/py/plugins/gcc.py @@ -193,6 +193,12 @@ def handle_args(self, parser, args, props): self.flags.append_flags(['-g', '-fno-omit-frame-pointer', '-fsanitize-recover=all']) + # sanitizers are not compatible with FORTIFY_SOURCE + # https://github.com/google/sanitizers/issues/247#issuecomment-1283500316 + self.flags.append_flags(["-Wp,-U_FORTIFY_SOURCE", + "-fplugin=annobin", + "-fplugin-arg-annobin-no-active-checks"]) + # create directory for sanitizer's results def create_cap_dir_hook(results, mock): cmd = f"mkdir -pv '{SANITIZER_CAPTURE_DIR}'"