Hello.

It's bit confusing for a use that -fsanitize-recover=address does not recover
an instrumented binary. As a default value of halt_on_error is set to 0 for 
address sanitizer,
the binary fails on a first error.

Following patch attempts to explain the ENV variable.

Ready for trunk?
Thanks,
Martin
>From 95f694a92428759773e5259323e82cbf49eade34 Mon Sep 17 00:00:00 2001
From: marxin <mli...@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  <mli...@suse.cz>

	* doc/invoke.texi: Explain connection between -fsanitize-recover=address
	and ASAN_OPTIONS="halt_on_error=1".
---
 gcc/doc/invoke.texi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index a54a0af..722647a 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -9998,6 +9998,12 @@ 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.
 
+The error recovery mode can be overwritten by @code{halt_on_error=1} provided
+to one of the following environment variables: @env{ASAN_OPTIONS}, @env{TSAN_OPTIONS}
+or @env{UBSAN_OPTIONS}. The default value is set to @code{halt_on_error=1},
+only the address sanitizer by default does not recover and @code{halt_on_error=0}
+must be provided.
+
 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

Reply via email to