On Wed, Apr 19, 2017 at 11:52:22AM +0200, Olivier Houchard wrote:
> Hi guys,
> 
> Thanks to your help, we finally figure out what was happening on FreeBSD,
> and the attached patch should fix it.
> Problem was, haproxy relies on what is really undefined behavior in C, with
> signed integer overflows. gcc and earlier versions of clang behaved as we
> expected, but newer versions of clang do not, which is why it started to be
> a problem with FreeBSD 11 (and is probably on other BSDs using clang, and
> MacOS X).
> 
> Thanks again for giving us enough informations to really figure that out, it
> would have been _tough_ overwise :)

Thanks Olivier (and to all those giving enough feedback making it possible
to figure the real issue). I've now taken it and already backported to 1.7.
I'll backport to older branches as well since many people will progressively
get hit as they upgrade their compilers :-/

It's really sad that there is no way to get any single warning from Clang
when it purposely decides to "optimize" this check in a way that can be
disabled with specific options.

Willy

Reply via email to