a patch to make gtk-gnutella behave better in valgrind so you can see the real undefined behavior
Index: src/lib/entropy.c =================================================================== --- src/lib/entropy.c (revision 17133) +++ src/lib/entropy.c (working copy) @@ -146,9 +146,21 @@ } /* - * Add local CPU state noise. + * to test with valgrind define VALGRIND_MODE + * in the environment before executing it + * eg: + * + * $ VALGRIND_MODE=1 valgrind gtk-gnutella + * */ + + if(!getenv("VALGRIND_MODE")){ + + /* + * Add local CPU state noise. + */ + if (setjmp(env)) { /* We will never longjmp() back here */ g_assert_not_reached(); @@ -259,6 +271,7 @@ /* * Done, finalize SHA1 computation into supplied digest buffer. */ + } /* not VALGRIND_MODE */ SHA1Result(&ctx, digest); } =================================================================== -- ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gtk-gnutella-devel mailing list gtk-gnutella-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel