mirror of
https://github.com/gperftools/gperftools
synced 2025-02-01 04:01:34 +00:00
mix thread stack address into sampler
This fixes test failures on freebsd (assert that sampler is seeded with non-0 value).
This commit is contained in:
parent
d9b14b9da1
commit
8fc84c29a3
@ -100,7 +100,7 @@ void ThreadCache::Init(pthread_t tid) {
|
||||
|
||||
uint32_t sampler_seed;
|
||||
memcpy(&sampler_seed, &tid, sizeof(sampler_seed));
|
||||
sampler_.Init(sampler_seed);
|
||||
sampler_.Init(uint64_t{sampler_seed} ^ reinterpret_cast<uintptr_t>(&sampler_seed));
|
||||
}
|
||||
|
||||
void ThreadCache::Cleanup() {
|
||||
|
Loading…
Reference in New Issue
Block a user