Re: [dpdk-dev] [PATCH v2 1/2] eal: fix undefined behavior in fbarray

2018-04-13 Thread Burakov, Anatoly
On 13-Apr-18 4:56 PM, Adrien Mazarguil wrote: According to GCC documentation [1], the __builtin_clz() family of functions yield undefined behavior when fed a zero value. There is one instance in the fbarray code where this can occur. Clang (at least version 3.8.0-2ubuntu4) seems much more sensit

[dpdk-dev] [PATCH v2 1/2] eal: fix undefined behavior in fbarray

2018-04-13 Thread Adrien Mazarguil
According to GCC documentation [1], the __builtin_clz() family of functions yield undefined behavior when fed a zero value. There is one instance in the fbarray code where this can occur. Clang (at least version 3.8.0-2ubuntu4) seems much more sensitive to this than GCC and yields random results w