File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,12 @@ This version is based on Valgrind-3.12.0.
16
16
- Continuous integration using the Travis system.
17
17
- Improve Delta-Debugging customization through environment variables.
18
18
19
+ ### Changed
19
20
21
+ - There is no need anymore for an external, statically compiled libc/libm.
22
+
23
+
24
+ ---
20
25
21
26
## v0.9.0 - 2017-03-31
22
27
Original file line number Diff line number Diff line change 32
32
33
33
#pragma once
34
34
35
+ extern " C" {
36
+ #include " pub_tool_libcproc.h"
37
+ }
35
38
36
39
class vrRand {
37
40
public:
@@ -49,7 +52,9 @@ public:
49
52
};
50
53
51
54
inline void setTimeSeed (unsigned int pid){
52
- unsigned int seed=/* time(NULL) + */ pid;
55
+ struct vki_timeval now;
56
+ VG_ (gettimeofday)(&now, NULL );
57
+ unsigned int seed = now.tv_usec + pid;
53
58
VG_ (umsg)(" First seed : %u\n " ,seed);
54
59
setSeed (seed);
55
60
};
@@ -90,13 +95,13 @@ private:
90
95
// srand(c);
91
96
vr_next_=c;
92
97
}
93
-
98
+
94
99
inline int privaterand (){
95
100
// rand();
96
101
vr_next_ = vr_next_ * 1103515245 + 12345 ;
97
102
return (unsigned int )(vr_next_/65536 ) % 32768 ;
98
103
}
99
-
104
+
100
105
inline int privateRAND_MAX ()const {
101
106
// return RAND_MAX;
102
107
return 32767 ;
You can’t perform that action at this time.
0 commit comments