forked from OSchip/llvm-project
[compiler-rt][hwasan][fuchsia] Define shadow bound globals
These are required by MemIsShadow for checking if an address actually is shadow memory. Differential Revision: https://reviews.llvm.org/D105745
This commit is contained in:
parent
58aa3881ba
commit
b50fb58695
|
@ -34,6 +34,15 @@ bool InitShadow() {
|
|||
__sanitizer::InitShadowBounds();
|
||||
CHECK_NE(__sanitizer::ShadowBounds.shadow_limit, 0);
|
||||
|
||||
// These variables are used by MemIsShadow for asserting we have a correct
|
||||
// shadow address. On Fuchsia, we only have one region of shadow, so the
|
||||
// bounds of Low shadow can be zero while High shadow represents the true
|
||||
// bounds. Note that these are inclusive ranges.
|
||||
kLowShadowStart = 0;
|
||||
kLowShadowEnd = 0;
|
||||
kHighShadowStart = __sanitizer::ShadowBounds.shadow_base;
|
||||
kHighShadowEnd = __sanitizer::ShadowBounds.shadow_limit - 1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue