[compiler-rt] [llvm] [HWASan][Fuchsia] Have Fuchsia use a dynamic shadow start (PR #180881)
Roland McGrath via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 11 17:11:15 PST 2026
================
@@ -46,12 +46,17 @@ bool InitShadow() {
__sanitizer::InitShadowBounds();
CHECK_NE(__sanitizer::ShadowBounds.shadow_limit, 0);
+ __hwasan_shadow_memory_dynamic_address = 0;
----------------
frobtech wrote:
You can compute this from `ShadowBounds`.
The comment for `sanitizer_shadow_bounds_t` describes it as always zero-based, but we could change that without changing the actual meaning of the struct fields. Then from the size of the shadow you can figure out how much "shadow of shadow" would be implied below it and calculate that out to conclude that the base is 0 from today's nonzero `.shadow_base` value.
However, no change is needed here at all right now. The definition of the variable has no initializer, so it's initialized to zero already. AFAICT there is no need to touch the runtime at all yet just to make the compiler change and have it stay compatible with the runtime.
https://github.com/llvm/llvm-project/pull/180881
More information about the llvm-commits
mailing list