diff options
author | marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-07-17 11:44:54 +0000 |
---|---|---|
committer | marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-07-17 11:44:54 +0000 |
commit | 96cea83ca9362a5598ab54ed83132cc0ab30a7e7 (patch) | |
tree | 2d0b3bb9ecb59da52e87b8ff753f0b8fa951d255 | |
parent | 1c4ee7690c21eed4712dd8dfca6785621a577dc2 (diff) | |
download | gcc-96cea83ca9362a5598ab54ed83132cc0ab30a7e7.tar.gz |
Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302).
2017-07-17 Martin Liska <mliska@suse.cz>
PR sanitizer/81302
* opts.c (finish_options): Do not allow -fgnu-tm
w/ -fsanitize={kernel-,}address. Say sorry.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250271 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/opts.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ce0b6cc4ebf..f241a89ad2c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-07-17 Martin Liska <mliska@suse.cz> + + PR sanitizer/81302 + * opts.c (finish_options): Do not allow -fgnu-tm + w/ -fsanitize={kernel-,}address. Say sorry. + 2017-07-17 Bin Cheng <bin.cheng@arm.com> PR target/81369 diff --git a/gcc/opts.c b/gcc/opts.c index 0343d6a5e86..3182bc99d65 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -1005,6 +1005,13 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, opts->x_flag_stack_reuse = SR_NONE; } + + if ((opts->x_flag_sanitize & SANITIZE_USER_ADDRESS) && opts->x_flag_tm) + sorry ("transactional memory is not supported with %<-fsanitize=address%>"); + + if ((opts->x_flag_sanitize & SANITIZE_KERNEL_ADDRESS) && opts->x_flag_tm) + sorry ("transactional memory is not supported with " + "%<-fsanitize=kernel-address%>"); } #define LEFT_COLUMN 27 |