Re: failure with Clang's memory sanitizer: use-of-uninitialized-value

2019-03-29 Thread Vincent Lefevre
On 2019-03-29 06:20:31 +0100, Niels Möller wrote: > A bit unobvious what MPN_COPY expands to, but possibly some assembly > that the clang analyzer can't reason about? I've just looked at the Clang documentation, and it says: MemorySanitizer requires that all program code is instrumented. This

Re: failure with Clang's memory sanitizer: use-of-uninitialized-value

2019-03-28 Thread Niels Möller
Marc Glisse writes: > Just recompiling GMP with CC='clang-7 -fsanitize=memory' (and > --disable-shared) gives the more specific > > ==28897==WARNING: MemorySanitizer: use-of-uninitialized-value > #0 0x498856 in mpn_bc_get_str /tmp/g/mpn/get_str.c:239:7 Looks like the branch on rp[1] here,

Re: failure with Clang's memory sanitizer: use-of-uninitialized-value

2019-03-28 Thread Marc Glisse
On Thu, 28 Mar 2019, Niels Möller wrote: Vincent Lefevre writes: On my Debian/unstable x86_64 machine (with GMP 6.1.2): #include int main (void) { mpz_t z; mpz_init (z); mpz_set_ui (z, 1); mpz_dump (z); mpz_clear (z); return 0; } compiled with: clang-7 -fsanitize=memory -o