* [PATCH] docs: document sanitizers can trigger warnings
@ 2022-10-26 11:09 Martin Liška
2022-10-27 22:52 ` Jeff Law
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Martin Liška @ 2022-10-26 11:09 UTC (permalink / raw)
To: gcc-patches; +Cc: Gerald Pfeifer, Jakub Jelinek
PR sanitizer/107298
gcc/ChangeLog:
* doc/invoke.texi: Document sanitizers can trigger warnings.
---
gcc/doc/invoke.texi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 64f77e8367a..1ffbba16a72 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -16460,6 +16460,10 @@ by this option.
@end table
+Note the enabled sanitizer options tend to increase a false-positive rate
+of selected warnings, most notably @option{-Wmaybe-uninitialized}.
+And thus we recommend to disable @option{-Werror}.
+
While @option{-ftrapv} causes traps for signed overflows to be emitted,
@option{-fsanitize=undefined} gives a diagnostic message.
This currently works only for the C family of languages.
--
2.38.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs: document sanitizers can trigger warnings
2022-10-26 11:09 [PATCH] docs: document sanitizers can trigger warnings Martin Liška
@ 2022-10-27 22:52 ` Jeff Law
2022-10-28 18:45 ` Eric Gallager
2022-11-03 12:32 ` Gerald Pfeifer
2 siblings, 0 replies; 5+ messages in thread
From: Jeff Law @ 2022-10-27 22:52 UTC (permalink / raw)
To: Martin Liška, gcc-patches; +Cc: Jakub Jelinek
On 10/26/22 05:09, Martin Liška wrote:
> PR sanitizer/107298
>
> gcc/ChangeLog:
>
> * doc/invoke.texi: Document sanitizers can trigger warnings.
OK
jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs: document sanitizers can trigger warnings
2022-10-26 11:09 [PATCH] docs: document sanitizers can trigger warnings Martin Liška
2022-10-27 22:52 ` Jeff Law
@ 2022-10-28 18:45 ` Eric Gallager
2022-11-03 12:32 ` Gerald Pfeifer
2 siblings, 0 replies; 5+ messages in thread
From: Eric Gallager @ 2022-10-28 18:45 UTC (permalink / raw)
To: Martin Liška; +Cc: gcc-patches, Jakub Jelinek
On Wed, Oct 26, 2022 at 7:09 AM Martin Liška <mliska@suse.cz> wrote:
>
> PR sanitizer/107298
>
> gcc/ChangeLog:
>
> * doc/invoke.texi: Document sanitizers can trigger warnings.
> ---
> gcc/doc/invoke.texi | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 64f77e8367a..1ffbba16a72 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -16460,6 +16460,10 @@ by this option.
>
> @end table
>
> +Note the enabled sanitizer options tend to increase a false-positive rate
> +of selected warnings, most notably @option{-Wmaybe-uninitialized}.
> +And thus we recommend to disable @option{-Werror}.
> +
I'd recommend rewording the second sentence there as:
"Thus, GCC developers recommend disabling @option{-Werror} when using
sanitizer options."
> While @option{-ftrapv} causes traps for signed overflows to be emitted,
> @option{-fsanitize=undefined} gives a diagnostic message.
> This currently works only for the C family of languages.
> --
> 2.38.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs: document sanitizers can trigger warnings
2022-10-26 11:09 [PATCH] docs: document sanitizers can trigger warnings Martin Liška
2022-10-27 22:52 ` Jeff Law
2022-10-28 18:45 ` Eric Gallager
@ 2022-11-03 12:32 ` Gerald Pfeifer
2022-11-07 8:55 ` Martin Liška
2 siblings, 1 reply; 5+ messages in thread
From: Gerald Pfeifer @ 2022-11-03 12:32 UTC (permalink / raw)
To: Martin Liška; +Cc: gcc-patches, Jakub Jelinek
[-- Attachment #1: Type: text/plain, Size: 746 bytes --]
Hi Martin,
On Wed, 26 Oct 2022, Martin Liška wrote:
> +Note the enabled sanitizer options tend to increase a false-positive rate
> +of selected warnings, most notably @option{-Wmaybe-uninitialized}.
> +And thus we recommend to disable @option{-Werror}.
I've been sitting muling over this and here is what I'm wondering might
be a possible alternative?
Note that sanitzers tend to increase the rate of false positive
warnings, most notably those around @option{-Wmaybe-uninitialized}.
We recommend against combining @option{-Werror} and [the use of]
sanitzers.
Rationale for the second sentence: Disabling a warning that is off by
default confused my mental model (and maybe those of other readers). :-)
What do you think?
Gerald
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs: document sanitizers can trigger warnings
2022-11-03 12:32 ` Gerald Pfeifer
@ 2022-11-07 8:55 ` Martin Liška
0 siblings, 0 replies; 5+ messages in thread
From: Martin Liška @ 2022-11-07 8:55 UTC (permalink / raw)
To: Gerald Pfeifer; +Cc: gcc-patches, Jakub Jelinek
On 11/3/22 13:32, Gerald Pfeifer wrote:
> Hi Martin,
>
> On Wed, 26 Oct 2022, Martin Liška wrote:
>> +Note the enabled sanitizer options tend to increase a false-positive rate
>> +of selected warnings, most notably @option{-Wmaybe-uninitialized}.
>> +And thus we recommend to disable @option{-Werror}.
>
> I've been sitting muling over this and here is what I'm wondering might
> be a possible alternative?
>
> Note that sanitzers tend to increase the rate of false positive
> warnings, most notably those around @option{-Wmaybe-uninitialized}.
> We recommend against combining @option{-Werror} and [the use of]
> sanitzers.
>
>
> Rationale for the second sentence: Disabling a warning that is off by
> default confused my mental model (and maybe those of other readers). :-)
>
> What do you think?
I welcome it and I've pushed pushed your version.
Thanks,
Martin
>
> Gerald
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-07 8:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26 11:09 [PATCH] docs: document sanitizers can trigger warnings Martin Liška
2022-10-27 22:52 ` Jeff Law
2022-10-28 18:45 ` Eric Gallager
2022-11-03 12:32 ` Gerald Pfeifer
2022-11-07 8:55 ` Martin Liška
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).