GMP 5.1.1: Valgrind reports incorrect read in __gmpn_copyd (called from __gmpz_mul_2exp)

Zimmermann Paul Paul.Zimmermann at loria.fr
Thu Feb 21 09:15:23 CET 2013


       Marco,

> Can you please try if your test passes with "valgrind
> --partial-loads-ok=yes" ?

it still fails:

tarte% valgrind --partial-loads-ok=yes ./a.out
==15432== Memcheck, a memory error detector
==15432== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==15432== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==15432== Command: ./a.out
==15432== 
==15432== Invalid read of size 8
==15432==    at 0x401A74: __gmpn_copyd (in /tmp/gmp-5.1.1/a.out)
==15432==    by 0x4009CF: __gmpz_mul_2exp (in /tmp/gmp-5.1.1/a.out)
==15432==    by 0x40086D: main (in /tmp/gmp-5.1.1/a.out)
==15432==  Address 0x51f25a8 is 0 bytes after a block of size 984 alloc'd
==15432==    at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15432==    by 0x401C9B: __gmp_default_reallocate (in /tmp/gmp-5.1.1/a.out)
==15432==    by 0x400A26: __gmpz_realloc (in /tmp/gmp-5.1.1/a.out)
==15432==    by 0x400AE5: __gmpz_set (in /tmp/gmp-5.1.1/a.out)
==15432==    by 0x400854: main (in /tmp/gmp-5.1.1/a.out)

Paul


More information about the gmp-bugs mailing list