Re: [PATCH v3] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Martin Liška
On 6/9/20 3:47 PM, Marco Elver wrote: I think one of you has to commit the patch, as we don't have access to the GCC git repository. I've just done that. I also fixed few wrong formatting issues, next time please use ./contrib/check_GNU_style.py. You'll be preparing one another patch, please

Re: [PATCH v3] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Marco Elver via Gcc-patches
On Tue, 9 Jun 2020 at 15:22, Jakub Jelinek wrote: > > On Tue, Jun 09, 2020 at 03:15:39PM +0200, Marco Elver wrote: > > gcc/ > > * params.opt: Define --param=tsan-distinguish-volatile=[0,1]. > > * sanitizer.def (BUILT_IN_TSAN_VOLATILE_READ1): Define new > > builtin for volatile in

Re: [PATCH v3] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 03:15:39PM +0200, Marco Elver wrote: > gcc/ > * params.opt: Define --param=tsan-distinguish-volatile=[0,1]. > * sanitizer.def (BUILT_IN_TSAN_VOLATILE_READ1): Define new > builtin for volatile instrumentation of reads/writes. > (BUILT_IN_TSAN_VOLATILE_

[PATCH v3] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Marco Elver via Gcc-patches
Add support to optionally emit different instrumentation for accesses to volatile variables. While the default TSAN runtime likely will never require this feature, other runtimes for different environments that have subtly different memory models or assumptions may require distinguishing volatiles.