sanitizer: Fix hwasan related option conflicts [PR106132]
Split report_conflicting_sanitizer_options(..., SANITIZE_ADDRESS | SANITIZE_HWADDRESS) call into 2 calls as we don't have any option that would be address+hwaddress (that conflicts) as well. PR sanitizer/106132 gcc/ChangeLog: * opts.cc (finish_options): Use 2 calls to report_conflicting_sanitizer_options. gcc/testsuite/ChangeLog: * c-c++-common/hwasan/arguments-3.c: Cover new ICE.
This commit is contained in:
parent
cf3a120084
commit
6da7f7c5ac
2 changed files with 6 additions and 2 deletions
|
@ -1214,7 +1214,9 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
|
|||
|
||||
/* Address sanitizers conflict with the thread sanitizer. */
|
||||
report_conflicting_sanitizer_options (opts, loc, SANITIZE_THREAD,
|
||||
SANITIZE_ADDRESS | SANITIZE_HWADDRESS);
|
||||
SANITIZE_ADDRESS);
|
||||
report_conflicting_sanitizer_options (opts, loc, SANITIZE_THREAD,
|
||||
SANITIZE_HWADDRESS);
|
||||
/* The leak sanitizer conflicts with the thread sanitizer. */
|
||||
report_conflicting_sanitizer_options (opts, loc, SANITIZE_LEAK,
|
||||
SANITIZE_THREAD);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-additional-options "-fsanitize=thread" } */
|
||||
/* { dg-additional-options "-fsanitize=thread,address" } */
|
||||
/* { dg-error ".*'-fsanitize=thread' is incompatible with '-fsanitize=address'.*" "" { target *-*-* } 0 } */
|
||||
/* { dg-error ".*'-fsanitize=thread' is incompatible with '-fsanitize=hwaddress'.*" "" { target *-*-* } 0 } */
|
||||
/* { dg-error ".*'-fsanitize=hwaddress' is incompatible with '-fsanitize=address'.*" "" { target *-*-* } 0 } */
|
||||
|
|
Loading…
Add table
Reference in a new issue