Re: [cfe-users] Clang9 UBSan and GMP

2019-11-07 Thread Hans Wennborg via cfe-users
I'm a fan of GMP, so I'll jump :-) Regardless of whether this is a bug in LLVM or GMP, it would be satisfying to get to the root of the problem. Bisecting over LLVM shows that GMP's mpn test t-sqrlo starts failing on my x86_64 Linux machine after this commit at 8ee477a2ab6 "[InstSimplify] Simpli

Re: [cfe-users] Clang9 UBSan and GMP

2019-11-07 Thread David Blaikie via cfe-users
UBSan doesn't cover this sort of thing - MSan is the sanitizer for catching uninitialized values. (MSan is, unfortunately, a bit more finicky to use because the whole program (including the standard library) must be compiled with the feature enabled for it to work correctly - I don't have an MSan e

Re: [cfe-users] Clang9 UBSan and GMP

2019-11-07 Thread David Blaikie via cfe-users
Looks like valgrind catches some things around here: ==115793== Conditional jump or move depends on uninitialised value(s) ==115793==at 0x402671: main (t-sqrlo.c:106) ==115793== ==115793== Conditional jump or move depends on uninitialised value(s) ==115793==at 0x40268A: main (t-sqrlo.c:107

[cfe-users] error: inline function '_BitScanForward' is not defined

2019-11-07 Thread pendyala syam via cfe-users
Hi Team, While compiling my source cpp file which is including intrin.h, clang is throwing the following error error: inline function '_BitScanForward' is not defined [-Werror,-Wundefined -inline] _BitScanForward ( I checked clang headers for definition but in clang intrin.h header file its jus