Chromium Code Reviews| Index: third_party/tcmalloc/chromium/src/free_list.cc |
| =================================================================== |
| --- third_party/tcmalloc/chromium/src/free_list.cc (revision 158339) |
| +++ third_party/tcmalloc/chromium/src/free_list.cc (working copy) |
| @@ -82,7 +82,8 @@ |
| inline void* MaskPtr(void* p) { |
| // Maximize ASLR entropy and guarantee the result is an invalid address. |
| - const uintptr_t q = ~(reinterpret_cast<intptr_t>(TCMalloc_SystemAlloc) >> 13); |
| + const uintptr_t q = ~(reinterpret_cast<uintptr_t>(TCMalloc_SystemAlloc) |
|
jar (doing other things)
2012/09/24 21:59:54
nit: rename q--> mask
jschuh
2012/09/24 22:06:00
Done.
|
| + >> 13) | 1; |
| // Do not mask NULL pointers, otherwise we could leak address state. |
| if (p) |
| return reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(p) ^ q); |