This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Switch StackStore from pointers to 32bit IDs
ClosedPublic

Authored by vitalybuka on Nov 23 2021, 5:38 PM.

Diff Detail

Event Timeline

vitalybuka requested review of this revision.Nov 23 2021, 5:38 PM
vitalybuka created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2021, 5:38 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
dvyukov accepted this revision.Nov 24 2021, 6:32 AM
This revision is now accepted and ready to land.Nov 24 2021, 6:32 AM
kstoimenov accepted this revision.Nov 24 2021, 10:02 AM
kstoimenov added a subscriber: kstoimenov.
kstoimenov added inline comments.
compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h
48

Can we add a check that id > 0? Also I am usually nervous about using '-' for unsigned type.

kstoimenov added inline comments.Nov 24 2021, 10:07 AM
compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h
72

I noticed that you have to cast to u8 * in D114503. Does it have to return uptr *?

vitalybuka marked an inline comment as done.

CHECK

vitalybuka added inline comments.Nov 24 2021, 11:02 AM
compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h
72

Than I need cast to uptr* from u8*, which is worse as alignment will be less clear
GetAs<uptr>() and GetAs<u8>() ?

kstoimenov accepted this revision.Nov 24 2021, 11:57 AM
kstoimenov added inline comments.
compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h
72

Your call. I just notice that you have to cast and wanted to point it out.