Marc Glisse <marc.gli...@inria.fr> 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,

      ul = rp[1];      
      while (ul != 0)  // <---

rp[1] appears initialized with

      MPN_COPY (rp + 1, up, un);

A bit unobvious what MPN_COPY expands to, but possibly some assembly
that the clang analyzer can't reason about? Since the result of the
function is as expected, it seems unlikely that ul doesn't hold the
proper input value.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
_______________________________________________
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs

Reply via email to