Page MenuHomePhabricator

tsan: make IsMetaMem accept u32*
ClosedPublic

Authored by dvyukov on Aug 4 2021, 10:18 AM.

Details

Summary

MemToMeta returns u32*, so it's reasonable for IsMetaMem
to accept u32* as well.
Changing the argument type just removes few type casts.

Diff Detail

Event Timeline

dvyukov requested review of this revision.Aug 4 2021, 10:18 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2021, 10:18 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
vitalybuka accepted this revision.Aug 4 2021, 11:06 AM
vitalybuka added inline comments.
compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
331

is this const for text alignment or it actually affects some optimization?

This revision is now accepted and ready to land.Aug 4 2021, 11:06 AM
dvyukov added inline comments.Aug 5 2021, 2:32 AM
compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
331

It's just to make it constant (prevent accidental changes, make readers to be able to assume that the value is not changing). Currently we use "const uptr", so I just kept the const.

This revision was automatically updated to reflect the committed changes.