Date: Thu, 5 Feb 2015 16:22:23 +0100 From: Luigi Rizzo <rizzo@iet.unipi.it> To: John Baldwin <jhb@freebsd.org> Cc: Konstantin Belousov <kostikbel@gmail.com>, freebsd-current@freebsd.org, Peter Wemm <peter@wemm.org> Subject: Re: PSA: If you run -current, beware! Message-ID: <20150205152223.GA59664@onelab2.iet.unipi.it> In-Reply-To: <2613155.3ZBxDvY16q@ralph.baldwin.cx> References: <8089702.oYScRm8BTN@overcee.wemm.org> <2509923.ondFvsFdql@overcee.wemm.org> <CA%2BhQ2%2BiVE53PJs0noc_SPHpwDZVLX-tHpgYmzO9tGzJzDXwXWg@mail.gmail.com> <2613155.3ZBxDvY16q@ralph.baldwin.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 05, 2015 at 08:21:45AM -0500, John Baldwin wrote: > On Thursday, February 05, 2015 08:48:33 AM Luigi Rizzo wrote: ... > > > > It is fixed (in the proper meaning of the word, not like worked around, > > > > covered by paper) by the patch at the end of the mail. > > > > > > > > We already have a story trying to enable much less ambitious option > > > > -fno-strict-overflow, see r259045 and the revert in r259422. I do not > > > > see other way than try one more time. Too many places in kernel > > > > depend on the correctly wrapping 2-complement arithmetic, among others > > > > are callweel and scheduler. > > > > Rather than depending on a compiler option, wouldn't it be better/more > > robust to change ticks to unsigned, which has specified wrapping behavior? > > Yes, but non-trivial. It's also not limited to ticks. Since the compiler > knows when it would apply these optimizations, it would be nice if it could > warn instead (GCC apparently has a warning, but clang does not). Having > people do a manual audit of every signed integer expression in the tree will > take a long time. I think I misunderstood the problem as being limited to ticks, which is probably only one symptom of a fundamental change in behaviour of the compiler. Still, it might be worthwhile start looking at ints that ought to be implemented as u_int cheers luigi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150205152223.GA59664>