* [PATCH] Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302).
@ 2017-07-10 9:35 Martin Liška
2017-07-17 9:18 ` Richard Biener
0 siblings, 1 reply; 3+ messages in thread
From: Martin Liška @ 2017-07-10 9:35 UTC (permalink / raw)
To: gcc-patches; +Cc: Jakub Jelinek
[-- 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302).
2017-07-10 9:35 [PATCH] Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302) Martin Liška
@ 2017-07-17 9:18 ` Richard Biener
2017-07-17 9:21 ` Jakub Jelinek
0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2017-07-17 9:18 UTC (permalink / raw)
To: Martin Liška; +Cc: GCC Patches, Jakub Jelinek
On Mon, Jul 10, 2017 at 11:35 AM, Martin Liška <mliska@suse.cz> wrote:
> Hello
>
> Following patch disables -fgnu-tm with AddressSanitizer.
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>
> Ready to be installed?
I think it should be a sorry () but no strong opinion.
Thanks,
Richard.
> 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(+)
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302).
2017-07-17 9:18 ` Richard Biener
@ 2017-07-17 9:21 ` Jakub Jelinek
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Jelinek @ 2017-07-17 9:21 UTC (permalink / raw)
To: Richard Biener; +Cc: Martin Liška, GCC Patches
On Mon, Jul 17, 2017 at 11:18:02AM +0200, Richard Biener wrote:
> On Mon, Jul 10, 2017 at 11:35 AM, Martin Liška <mliska@suse.cz> wrote:
> > Hello
> >
> > Following patch disables -fgnu-tm with AddressSanitizer.
> > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
> >
> > Ready to be installed?
>
> I think it should be a sorry () but no strong opinion.
Certainly better sorry than error, but ideally it should be just supported.
Of course with nobody actively working on -fgnu-tm that might take a while.
Jakub
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-17 9:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10 9:35 [PATCH] Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302) Martin Liška
2017-07-17 9:18 ` Richard Biener
2017-07-17 9:21 ` Jakub Jelinek
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).