public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [wwwdocs] Suggest UBsan in https://gcc.gnu.org/bugs/
@ 2015-10-06 10:54 Jonathan Wakely
  2015-10-06 11:16 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2015-10-06 10:54 UTC (permalink / raw)
  To: gcc-patches; +Cc: Gerald Pfeifer, Joseph Myers, Sandra Loosemore

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

For many non-bugs UBsan is at least as likely to reveal it as
-fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations so we
should tell people to try that before wasting time in Bugzilla.

OK for wwwdocs?

[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 873 bytes --]

Index: htdocs/bugs/index.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/bugs/index.html,v
retrieving revision 1.116
diff -u -r1.116 index.html
--- htdocs/bugs/index.html	5 Jul 2014 21:52:32 -0000	1.116
+++ htdocs/bugs/index.html	6 Oct 2015 10:50:32 -0000
@@ -50,7 +50,11 @@
 with <code>gcc -Wall -Wextra</code> and see whether this shows anything
 wrong with your code.  Similarly, if compiling with
 <code>-fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations</code>
-makes a difference, your code probably is not correct.</p>
+makes a difference, your code probably is not correct.
+If compiling with <code>-fsanitize=undefined</code> is supported by your
+version of GCC and produces any run-time errors your code is definitely
+not correct.
+</p>
 
 <h2>Summarized bug reporting instructions</h2>
 

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

* Re: [wwwdocs] Suggest UBsan in https://gcc.gnu.org/bugs/
  2015-10-06 10:54 [wwwdocs] Suggest UBsan in https://gcc.gnu.org/bugs/ Jonathan Wakely
@ 2015-10-06 11:16 ` Jonathan Wakely
  2015-10-07 14:18   ` Gerald Pfeifer
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2015-10-06 11:16 UTC (permalink / raw)
  To: gcc-patches; +Cc: Gerald Pfeifer, Joseph Myers, Sandra Loosemore

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

On 06/10/15 11:54 +0100, Jonathan Wakely wrote:
>For many non-bugs UBsan is at least as likely to reveal it as
>-fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations so we
>should tell people to try that before wasting time in Bugzilla.
>
>OK for wwwdocs?

>Index: htdocs/bugs/index.html
>===================================================================
>RCS file: /cvs/gcc/wwwdocs/htdocs/bugs/index.html,v
>retrieving revision 1.116
>diff -u -r1.116 index.html
>--- htdocs/bugs/index.html	5 Jul 2014 21:52:32 -0000	1.116
>+++ htdocs/bugs/index.html	6 Oct 2015 10:50:32 -0000
>@@ -50,7 +50,11 @@
> with <code>gcc -Wall -Wextra</code> and see whether this shows anything
> wrong with your code.  Similarly, if compiling with
> <code>-fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations</code>
>-makes a difference, your code probably is not correct.</p>
>+makes a difference, your code probably is not correct.
>+If compiling with <code>-fsanitize=undefined</code> is supported by your
>+version of GCC and produces any run-time errors your code is definitely
>+not correct.
>+</p>
> 
> <h2>Summarized bug reporting instructions</h2>
> 

On IRC Markus pointed out that ubsan works in all supported releases,
and that some code that gets ubsan errors still shows real gcc bugs,
so here's an updated patch.

[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 802 bytes --]

Index: htdocs/bugs/index.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/bugs/index.html,v
retrieving revision 1.116
diff -u -r1.116 index.html
--- htdocs/bugs/index.html	5 Jul 2014 21:52:32 -0000	1.116
+++ htdocs/bugs/index.html	6 Oct 2015 11:15:04 -0000
@@ -50,7 +50,9 @@
 with <code>gcc -Wall -Wextra</code> and see whether this shows anything
 wrong with your code.  Similarly, if compiling with
 <code>-fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations</code>
-makes a difference, your code probably is not correct.</p>
+makes a difference, or if compiling with <code>-fsanitize=undefined</code>
+produces any run-time errors, then your code is probably not correct.
+</p>
 
 <h2>Summarized bug reporting instructions</h2>
 

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

* Re: [wwwdocs] Suggest UBsan in https://gcc.gnu.org/bugs/
  2015-10-06 11:16 ` Jonathan Wakely
@ 2015-10-07 14:18   ` Gerald Pfeifer
  0 siblings, 0 replies; 3+ messages in thread
From: Gerald Pfeifer @ 2015-10-07 14:18 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-patches, Joseph Myers, Sandra Loosemore

On Tue, 6 Oct 2015, Jonathan Wakely wrote:
> On IRC Markus pointed out that ubsan works in all supported releases,
> and that some code that gets ubsan errors still shows real gcc bugs,
> so here's an updated patch.

This looks like a nice addition, thank you!

Gerald

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

end of thread, other threads:[~2015-10-07 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-06 10:54 [wwwdocs] Suggest UBsan in https://gcc.gnu.org/bugs/ Jonathan Wakely
2015-10-06 11:16 ` Jonathan Wakely
2015-10-07 14:18   ` Gerald Pfeifer

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