+3
-8
lines changedFilter options
+3
-8
lines changed Original file line number Diff line number Diff line change
@@ -402,14 +402,9 @@ uint32_t _upb_Hash(const void* p, size_t n, uint64_t seed) {
402
402
return Wyhash(p, n, seed, kWyhashSalt);
403
403
}
404
404
405
-
static const void* const _upb_seed;
406
-
407
-
// Returns a random seed for upb's hash function. This does not provide
408
-
// high-quality randomness, but it should be enough to prevent unit tests from
409
-
// relying on a deterministic map ordering. By returning the address of a
410
-
// variable, we are able to get some randomness for free provided that ASLR is
411
-
// enabled.
412
-
static uint64_t _upb_Seed(void) { return (uint64_t)&_upb_seed; }
405
+
// Returns a seed for upb's hash function. For now this is just a hard-coded
406
+
// constant, but we are going to randomize it soon.
407
+
static uint64_t _upb_Seed(void) { return 0x69835f69597ec1cc; }
413
408
414
409
static uint32_t _upb_Hash_NoSeed(const char* p, size_t n) {
415
410
return _upb_Hash(p, n, _upb_Seed());
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4