]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302).
authorMartin Liska <mliska@suse.cz>
Mon, 17 Jul 2017 11:44:54 +0000 (13:44 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 17 Jul 2017 11:44:54 +0000 (11:44 +0000)
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.

From-SVN: r250271

gcc/ChangeLog
gcc/opts.c

index ce0b6cc4ebfd36affba098d2773dab070888b78c..f241a89ad2cc5881cdc18ab7f140f4bcc10aa877 100644 (file)
@@ -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
index 0343d6a5e86d07154b362c4ded5f9cfd559eec43..3182bc99d65f40815cf838922d1e6ab027614eba 100644 (file)
@@ -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