This is an archive of the discontinued LLVM Phabricator instance.

tsan: fix latent bug in shadow computation
ClosedPublic

Authored by dvyukov on Aug 13 2021, 6:29 AM.

Details

Summary

We use kShadowCnt (number of shadow cells per application granule)
when computing shadow, but it's wrong. We need the ratio
between shadow and app memory (how much shadow is larger than app memory),
which is kShadowMultiplier.
Currently both are equal to 4, so it works fine.
Use the correct constant.

Diff Detail

Event Timeline

dvyukov requested review of this revision.Aug 13 2021, 6:29 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 13 2021, 6:29 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
melver accepted this revision.Aug 13 2021, 7:27 AM
This revision is now accepted and ready to land.Aug 13 2021, 7:27 AM
This revision was landed with ongoing or failed builds.Aug 13 2021, 7:39 AM
This revision was automatically updated to reflect the committed changes.