A better solution is to use a valgrind suppressions file, to suppress just this complaint. I have added such a file to libidn git, see:
http://git.savannah.gnu.org/gitweb/?p=libidn.git;a=blob;f=tests/libidn.supp;hb=HEAD See the end of the HACKING file for instructions on how to use it: http://git.savannah.gnu.org/gitweb/?p=libidn.git;a=blob;f=HACKING;hb=HEAD /Simon Funda Wang <[email protected]> writes: > Oh, thanks. Then I will disable the valgrind test. > > 2012/1/12 Simon Josefsson <[email protected]>: >> Funda Wang <[email protected]> writes: >> >>> Hello, >>> >>> I'm currently build libidn-1.24 with glibc 2.14.1/valgrind 3.7 under >>> Mageia cauldron. All builds fine, except that `make check' failed >>> after building. Log here: >>> >>> PASS: tst_idna >>> ==25261== Invalid read of size 4 >>> ==25261== at 0x4E328E5: idna_to_ascii_4z (idna.c:526) >>> >>> i.e., idna2 and idna4 tests are failed. Is it a bug in libidn or >>> valgrind? Regards. >> >> It is a valgrind issue, the line reads: >> >> size_t l = strlen (out) + 1 + strlen (buf) + 1; >> >> It is the glibc implementation of strlen that is optimized to read past >> the buffer, and valgrind detects this. >> >> The normal way to deal with this is to write a valgrind suppressions >> file. >> >> I'm leaning more and more to disable valgrind by default, it generates >> false positives like this... perhaps it is sufficient that I run it, >> and people can enable it with --enable-valgrind-tests if they want it. >> >> /Simon > > _______________________________________________ > Help-libidn mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/help-libidn _______________________________________________ Help-libidn mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-libidn
