failure with Clang's memory sanitizer: use-of-uninitialized-value
Vincent Lefevre
vincent at vinc17.net
Fri Mar 29 09:56:33 UTC 2019
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
also includes any libraries that the program depends on, even libc.
Failing to achieve this may result in false reports. For the same
reason you may need to replace all inline assembly code that writes
to memory with a pure C/C++ code.
So, indeed, one should recompile GMP with Clang and without asm code.
(BTW, if one needs to also recompile libc, this seems rather
impracticable.)
--
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the gmp-bugs
mailing list