Message ID | 573478DC.1050906@suse.cz |
---|---|
State | New |
Headers | show |
On Thu, May 12, 2016 at 02:36:44PM +0200, Martin Liška wrote: > On 05/11/2016 04:56 PM, Jakub Jelinek wrote: > > I think it better should say that: > > Even if a recovery mode is turned on the compiler side, it needs to be also > > enabled on the runtime library side, otherwise the failures are still fatal. > > The runtime library defaults to ... and this can be overridden through ... > > or so. > > Thanks for the hint, I've just installed v3 as r236172. > > Martin > >From 12336cb48bafffca7330e815d831d9c8ab1d0396 Mon Sep 17 00:00:00 2001 > From: marxin <mliska@suse.cz> > Date: Wed, 11 May 2016 16:05:49 +0200 > Subject: [PATCH] Document ASAN_OPTIONS="halt_on_error" env variable. > > gcc/ChangeLog: > > 2016-05-11 Martin Liska <mliska@suse.cz> > > * doc/invoke.texi: Explain connection between -fsanitize-recover=address > and ASAN_OPTIONS="halt_on_error=1". > --- > gcc/doc/invoke.texi | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > index a54a0af..c126644 100644 > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -9998,6 +9998,14 @@ for which this feature is experimental. > accepted, the former enables recovery for all sanitizers that support it, > the latter disables recovery for all sanitizers that support it. > > +Even if a recovery mode is turned on the compiler side, it needs to be also > +enabled on the runtime library side, otherwise the failures are still fatal. > +The runtime library defaults to @code{halt_on_error=0} for > +ThreadSanitizer and UndefinedBehaviorSanitizer, while default value for > +AddressSanitizer is @code{halt_on_error=1}. This can overridden through s/can/can be/ > +the following environment variables: @env{ASAN_OPTIONS}, @env{TSAN_OPTIONS}, > +@env{UBSAN_OPTIONS}. I think it isn't obvious that one needs to put halt_on_error=0 or halt_on_error=1 into those options and what to do if you need multiple options in there. Jakub
On 05/12/2016 02:44 PM, Jakub Jelinek wrote: > I think it isn't obvious that one needs to put halt_on_error=0 or > halt_on_error=1 into those options and what to do if you need multiple > options in there. What about changing the last sentence to: This can be overridden through a corresponding environment variable. Thanks Martin
On Fri, May 13, 2016 at 12:26:57PM +0200, Martin Liška wrote: > On 05/12/2016 02:44 PM, Jakub Jelinek wrote: > > I think it isn't obvious that one needs to put halt_on_error=0 or > > halt_on_error=1 into those options and what to do if you need multiple > > options in there. > > What about changing the last sentence to: > > This can be overridden through a corresponding environment variable. I think it is better to be explicit, so something like: This can be overridden through setting the halt_on_error flag in the corresponding environment variable. Jakub
From 12336cb48bafffca7330e815d831d9c8ab1d0396 Mon Sep 17 00:00:00 2001 From: marxin <mliska@suse.cz> Date: Wed, 11 May 2016 16:05:49 +0200 Subject: [PATCH] Document ASAN_OPTIONS="halt_on_error" env variable. gcc/ChangeLog: 2016-05-11 Martin Liska <mliska@suse.cz> * doc/invoke.texi: Explain connection between -fsanitize-recover=address and ASAN_OPTIONS="halt_on_error=1". --- gcc/doc/invoke.texi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a54a0af..c126644 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -9998,6 +9998,14 @@ for which this feature is experimental. accepted, the former enables recovery for all sanitizers that support it, the latter disables recovery for all sanitizers that support it. +Even if a recovery mode is turned on the compiler side, it needs to be also +enabled on the runtime library side, otherwise the failures are still fatal. +The runtime library defaults to @code{halt_on_error=0} for +ThreadSanitizer and UndefinedBehaviorSanitizer, while default value for +AddressSanitizer is @code{halt_on_error=1}. This can overridden through +the following environment variables: @env{ASAN_OPTIONS}, @env{TSAN_OPTIONS}, +@env{UBSAN_OPTIONS}. + Syntax without explicit @var{opts} parameter is deprecated. It is equivalent to @smallexample -fsanitize-recover=undefined,float-cast-overflow,float-divide-by-zero -- 2.8.2