public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org
Cc: Jakub Jelinek <jakub@redhat.com>
Subject: [PATCH] Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302).
Date: Mon, 10 Jul 2017 09:35:00 -0000	[thread overview]
Message-ID: <e9144b13-9853-3431-1d85-64b1bc46b906@suse.cz> (raw)

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

Hello

Following patch disables -fgnu-tm with AddressSanitizer.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.

Ready to be installed?
Martin

gcc/ChangeLog:

2017-07-04  Martin Liska  <mliska@suse.cz>

	PR sanitizer/81302
	* opts.c (finish_options): Do not allow -fgnu-tm
	w/ -fsanitize={kernel-,}address.
---
 gcc/opts.c | 8 ++++++++
 1 file changed, 8 insertions(+)



[-- Attachment #2: 0001-Do-not-allow-fgnu-tm-w-fsanitize-kernel-address-PR-s.patch --]
[-- Type: text/x-patch, Size: 651 bytes --]

diff --git a/gcc/opts.c b/gcc/opts.c
index 7460c2be1b6..c8affa4d704 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1004,6 +1004,14 @@ 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)
+    error_at (loc, "transactional memory is not supported with "
+	      "%<-fsanitize=address%>");
+
+  if ((opts->x_flag_sanitize & SANITIZE_KERNEL_ADDRESS) && opts->x_flag_tm)
+    error_at (loc, "transactional memory is not supported with "
+	      "%<-fsanitize=kernel-address%>");
 }
 
 #define LEFT_COLUMN	27


             reply	other threads:[~2017-07-10  9:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10  9:35 Martin Liška [this message]
2017-07-17  9:18 ` Richard Biener
2017-07-17  9:21   ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e9144b13-9853-3431-1d85-64b1bc46b906@suse.cz \
    --to=mliska@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).