diff options
Diffstat (limited to 'lib/esan/esan.cpp')
-rw-r--r-- | lib/esan/esan.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/esan/esan.cpp b/lib/esan/esan.cpp index 2fb77894d..09b530b66 100644 --- a/lib/esan/esan.cpp +++ b/lib/esan/esan.cpp @@ -141,9 +141,17 @@ static bool verifyShadowScheme() { } #endif +uptr VmaSize; + static void initializeShadow() { verifyAddressSpace(); + // This is based on the assumption that the intial stack is always allocated + // in the topmost segment of the user address space and the assumption + // holds true on all the platforms currently supported. + VmaSize = + (MostSignificantSetBitIndex(GET_CURRENT_FRAME()) + 1); + DCHECK(verifyShadowScheme()); Mapping.initialize(ShadowScale[__esan_which_tool]); |