|
From: Kurt R. <ku...@ro...> - 2006-02-27 21:50:29
|
Hi,
I've ran the openssl testsuite under valgrind, and was able to
find 2 cases where that are causing jumps being done bases on
uninintialised values. The uninintialised data comes from the
random number generator.
The random number generator is using data from various sources,
one of them is unintialised data, which can make sense for a
random number generator.
The problem however is that it is not detecting the error at the
point where the unintialised data is put in the pool, or even
extracted from it, but ussually at a totally different point that
has nothing to do with the random number generator anymore. This
also has as effect that there are lots of stack traces that show
up, and I don't think it's a good idea to add suppressions for
all of them.
I can get rid of all error messages by commenting out 2 lines of
code that call MD_Update() with an uninitialised buffer. One of
them looks like this:
#ifndef PURIFY
MD_Update(&m,buf,j); /* purify complains */
#endif
The other is just the same but without the purify
comments/ifndef.
Is there some way I can tell it to not consider that data (in
buf) as uninintialised? Or some other way I can avoid error
messages caused by it?
PS: I'm not on the list, please CC me.
Kurt
|
|
From: Julian S. <js...@ac...> - 2006-02-27 22:04:49
|
> Is there some way I can tell it to not consider that data (in > buf) as uninintialised? Yes, use the VALGRIND_MAKE_READABLE macro. See http://valgrind.org/docs/manual/mc-manual.html#mc-manual.clientreqs See http://valgrind.org/docs/manual/manual-core.html#manual-core.clientreq for some useful background on the client requests mechanism. J |