We use the address of a variable as the seed for upb's hash function, and this allows us to get some randomness from ASLR. The randomness is not perfect, especially since it won't necessarily help when ASLR is not enabled. However, it seems to be enough to prevent unit tests from relying on a deterministic map ordering. PiperOrigin-RevId: 721950394pull/20169/head
parent
9a228e1bf6
commit
066531df73
1 changed files with 8 additions and 3 deletions
Loading…
Reference in new issue