-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[hwasan] Add fixed_shadow_base flag #73980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
294ed9b
48eb300
0896aa8
2c9a4b4
fc08ffd
7005753
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,8 +106,14 @@ static uptr GetHighMemEnd() { | |
} | ||
|
||
static void InitializeShadowBaseAddress(uptr shadow_size_bytes) { | ||
__hwasan_shadow_memory_dynamic_address = | ||
FindDynamicShadowStart(shadow_size_bytes); | ||
// NULL is generally address zero, so it is not a valid location for the | ||
// shadow. | ||
if (flags()->fixed_shadow_base != 0) { | ||
__hwasan_shadow_memory_dynamic_address = flags()->fixed_shadow_base; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh,and maybe some test with use of the file? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably linux not android only test There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added compiler-rt/test/hwasan/TestCases/Linux/fixed-shadow.c There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For some reason, for static Android binaries, this branch gets taken |
||
} else { | ||
__hwasan_shadow_memory_dynamic_address = | ||
FindDynamicShadowStart(shadow_size_bytes); | ||
} | ||
} | ||
|
||
static void MaybeDieIfNoTaggingAbi(const char *message) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1, not sure that none will need NULL as a base
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done