This is an archive of the discontinued LLVM Phabricator instance.

[TSan][Darwin] Make malloc_size interceptor more robust
ClosedPublic

Authored by yln on Dec 17 2021, 9:32 AM.

Details

Summary

Previously we would crash in the TSan runtime if the user program passes
a pointer to malloc_size() that doesn't point into app memory.

In these cases, malloc_size() should return 0.

For ASan, we fixed a similar issue here:
https://reviews.llvm.org/D15008

Radar-Id: rdar://problem/86213149

Diff Detail

Event Timeline

yln requested review of this revision.Dec 17 2021, 9:32 AM
yln created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2021, 9:32 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
This revision is now accepted and ready to land.Dec 17 2021, 12:00 PM
aralisza accepted this revision.Dec 17 2021, 12:51 PM
This revision was landed with ongoing or failed builds.Dec 17 2021, 3:38 PM
This revision was automatically updated to reflect the committed changes.