Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Matthew Macy
> > False positives are compiler bugs. No they're not. No more than missed optimization opportunities. They're limitations in the control flow analysis. > > It does happen, with GCC more than with clang, that the compiler has too > many bugs and it's a bad practice to pessimize code to work

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Pedro Giffuni
On 05/24/18 11:00, Matthew Macy wrote: On Thu, May 24, 2018 at 8:58 AM, Warner Losh wrote: On Thu, May 24, 2018 at 12:53 AM, Matthew Macy wrote: On Wed, May 23, 2018 at 11:42 PM, Michael Tuexen wrote: On 24. May 2018,

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Matthew Macy
On Thu, May 24, 2018 at 8:58 AM, Warner Losh wrote: > > > On Thu, May 24, 2018 at 12:53 AM, Matthew Macy wrote: >> >> On Wed, May 23, 2018 at 11:42 PM, Michael Tuexen >> wrote: >> >> On 24. May 2018, at 08:36, Matthew Macy

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Warner Losh
On Thu, May 24, 2018 at 12:53 AM, Matthew Macy wrote: > On Wed, May 23, 2018 at 11:42 PM, Michael Tuexen > wrote: > >> On 24. May 2018, at 08:36, Matthew Macy wrote: > >> > >> On Wed, May 23, 2018 at 11:35 PM, Michael

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Matthew Macy
On Thu, May 24, 2018 at 8:54 AM, Warner Losh wrote: > > > On Thu, May 24, 2018 at 12:36 AM, Matthew Macy wrote: >> >> On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen >> wrote: >> >> On 24. May 2018, at 06:51, Matthew Macy

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Warner Losh
On Thu, May 24, 2018 at 12:36 AM, Matthew Macy wrote: > On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen > wrote: > >> On 24. May 2018, at 06:51, Matthew Macy wrote: > >> > >> Warnings find bugs PERIOD. Although most are

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Matthew Macy
On Wed, May 23, 2018 at 11:42 PM, Michael Tuexen wrote: >> On 24. May 2018, at 08:36, Matthew Macy wrote: >> >> On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen >> wrote: On 24. May 2018, at 06:51,

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Michael Tuexen
> On 24. May 2018, at 08:36, Matthew Macy wrote: > > On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen > wrote: >>> On 24. May 2018, at 06:51, Matthew Macy wrote: >>> >>> Warnings find bugs PERIOD. Although most are not

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Michael Tuexen
> On 24. May 2018, at 06:51, Matthew Macy wrote: > > Warnings find bugs PERIOD. Although most are not useful, I've found Some warnings indicate bugs, some warnings are just wrong. If you have a "may be used uninitialized" warning being a false positive, you may silences the

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Matthew Macy
On Wed, May 23, 2018 at 10:25 PM, Gleb Smirnoff wrote: > On Wed, May 23, 2018 at 10:13:25PM -0700, Matthew Macy wrote: > M> On Wed, May 23, 2018 at 10:07 PM, Gleb Smirnoff > wrote: > M> > Can you please explain the bug supposed to be fixed by r333860

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Matthew Macy
On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen wrote: >> On 24. May 2018, at 06:51, Matthew Macy wrote: >> >> Warnings find bugs PERIOD. Although most are not useful, I've found > Some warnings indicate bugs, some warnings are just wrong. If

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Gleb Smirnoff
On Wed, May 23, 2018 at 10:13:25PM -0700, Matthew Macy wrote: M> On Wed, May 23, 2018 at 10:07 PM, Gleb Smirnoff wrote: M> > Can you please explain the bug supposed to be fixed by r333860 QUESTION MARK M> M> Did I say it fixed a bug? Or are you saying we should just turn

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Gleb Smirnoff
Can you please explain the bug supposed to be fixed by r333860 QUESTION MARK On Wed, May 23, 2018 at 09:51:34PM -0700, Matthew Macy wrote: M> Warnings find bugs PERIOD. Although most are not useful, I've found M> quite a number of real issues from compiling with gcc8. M> M> If you want to

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Matthew Macy
Warnings find bugs PERIOD. Although most are not useful, I've found quite a number of real issues from compiling with gcc8. If you want to _actually_ be helpful fix these: https://people.freebsd.org/~mmacy/gcc8logs/GENERIC-NODEBUG.log https://people.freebsd.org/~mmacy/gcc8logs/GENERIC.log On

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Gleb Smirnoff
Let me repeat again. The warning is a false positive, and thus assignment isn't useful. I'm not worried about a single instruction, more about polluting the code. If the warning was escalated to build error, and we did carry about building with gcc8, in this case the assignment should be added

Re: svn commit: r333860 - head/sys/kern

2018-05-24 Thread Matthew Macy
On Wed, May 23, 2018 at 10:07 PM, Gleb Smirnoff wrote: > Can you please explain the bug supposed to be fixed by r333860 QUESTION MARK Did I say it fixed a bug? Or are you saying we should just turn off compiler warnings because Gleb Smirnoff knows better? -M > On Wed, May

Re: svn commit: r333860 - head/sys/kern

2018-05-23 Thread Matthew Macy
On Wed, May 23, 2018 at 3:57 PM, Gleb Smirnoff wrote: > The initialization isn't useful. It silences a gcc warning. So yes it is. It's this exchange which is not useful. -M > On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: > M> Talk to the gcc devs. The

Re: svn commit: r333860 - head/sys/kern

2018-05-23 Thread Gleb Smirnoff
The initialization isn't useful. On Wed, May 23, 2018 at 03:52:42PM -0700, Matthew Macy wrote: M> Talk to the gcc devs. The warning is useful even if there are false positives. M> M> On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff wrote: M> > Hi, M> > M> > On Sat, May 19,

Re: svn commit: r333860 - head/sys/kern

2018-05-23 Thread Matthew Macy
Talk to the gcc devs. The warning is useful even if there are false positives. On Wed, May 23, 2018 at 3:27 PM, Gleb Smirnoff wrote: > Hi, > > On Sat, May 19, 2018 at 05:10:52AM +, Matt Macy wrote: > M> Author: mmacy > M> Date: Sat May 19 05:10:51 2018 > M> New

Re: svn commit: r333860 - head/sys/kern

2018-05-23 Thread Gleb Smirnoff
Hi, On Sat, May 19, 2018 at 05:10:52AM +, Matt Macy wrote: M> Author: mmacy M> Date: Sat May 19 05:10:51 2018 M> New Revision: 333860 M> URL: https://svnweb.freebsd.org/changeset/base/333860 M> M> Log: M> sendfile: annotate unused value and ensure that npages is actually initialized M>

svn commit: r333860 - head/sys/kern

2018-05-18 Thread Matt Macy
Author: mmacy Date: Sat May 19 05:10:51 2018 New Revision: 333860 URL: https://svnweb.freebsd.org/changeset/base/333860 Log: sendfile: annotate unused value and ensure that npages is actually initialized Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c