Similar to SHADOW_OFFSET on asan, we can use this for hwasan so platforms that use a constant value for the start of shadow memory can just use the constant rather than access a global.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/lib/hwasan/hwasan_mapping.h | ||
---|---|---|
51 | Maybe the following to minimize code which compiles only on limited set of platforms? inline uptr GetShadowOffset() { return SANITIZER_FUCHSIA ? 0 : __hwasan_shadow_memory_dynamic_address; } | |
56–57 |
please fix |
compiler-rt/lib/hwasan/hwasan_mapping.h | ||
---|---|---|
54 | I think you'll eventually need to make this an #if or if constexpr for it to be kosher that the symbol isn't defined at all, which is what we'd ideally like to have on Fuchsia. |
compiler-rt/lib/hwasan/hwasan_mapping.h | ||
---|---|---|
54 | static inline? |
compiler-rt/lib/hwasan/hwasan_mapping.h | ||
---|---|---|
54 | Plain inline has correct semantics here, and is consistent with the existing functions below. |
compiler-rt/lib/hwasan/hwasan_mapping.h | ||
---|---|---|
54 | that's exactly the point: inline and no exported symbol |
Maybe the following to minimize code which compiles only on limited set of platforms?