Don't use RAND_bytes() under valgrind.

The results are marked uninitialized and trigger spew.
Esse commit está contido em:
Edwin Smith
2013-05-25 12:09:30 -07:00
commit de Sara Golemon
commit 76546fceb5
+4
Ver Arquivo
@@ -254,6 +254,10 @@ double math_combined_lcg() {
}
int64_t math_generate_seed() {
#ifdef VALGRIND
// valgrind treats memory from RAND_bytes as uninitialized
return GENERATE_SEED();
#endif
int64_t value;
if (RAND_bytes((unsigned char *)&value, sizeof(value)) < 1) {
return GENERATE_SEED();