public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, DOC] Document ASAN_OPTIONS="halt_on_error" env variable.
@ 2016-05-11 14:13 Martin Liška
  2016-05-11 14:20 ` Jakub Jelinek
  2016-05-11 14:29 ` Yury Gribov
  0 siblings, 2 replies; 11+ messages in thread
From: Martin Liška @ 2016-05-11 14:13 UTC (permalink / raw)
  To: GCC Patches; +Cc: Jakub Jelinek

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

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

[-- Attachment #2: 0001-Document-ASAN_OPTIONS-halt_on_error-env-variable.patch --]
[-- Type: text/x-patch, Size: 1319 bytes --]

From 95f694a92428759773e5259323e82cbf49eade34 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 | 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-05-13 11:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-11 14:13 [PATCH, DOC] Document ASAN_OPTIONS="halt_on_error" env variable Martin Liška
2016-05-11 14:20 ` Jakub Jelinek
2016-05-11 14:48   ` Martin Liška
2016-05-11 14:57     ` Jakub Jelinek
2016-05-11 16:00       ` Sandra Loosemore
2016-05-12 12:37       ` Martin Liška
2016-05-12 12:44         ` Jakub Jelinek
2016-05-13 10:27           ` Martin Liška
2016-05-13 11:03             ` Jakub Jelinek
2016-05-13 11:13               ` Martin Liška
2016-05-11 14:29 ` Yury Gribov

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).