Skip to content

Commit

Permalink
gcc: disable code fortification with sanitizers
Browse files Browse the repository at this point in the history
  • Loading branch information
lzaoral committed Feb 1, 2023
1 parent 6b5d77e commit 903bf79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions py/plugins/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}'"
Expand Down

0 comments on commit 903bf79

Please # to comment.