Re: [PATCH] Fix haproxy hangs on FreeBSD >= 11

2017-04-19 Thread Willy Tarreau
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 overflow

[PATCH] Fix haproxy hangs on FreeBSD >= 11

2017-04-19 Thread Olivier Houchard
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 version