This is an archive of the discontinued LLVM Phabricator instance.

[TSAN][Darwin] Forward declare spinlock functions on darwin for TSAN interceptors
ClosedPublic

Authored by thetruestblue on Mar 21 2023, 9:09 AM.

Details

Summary

Spinlock symbols are removed from headers in MacOS version 10.12 and greater.
Even though they are deprecated, the symbols remain available on the system.

The TSAN interceptors currently cause a build failure after this version because
of the change in availability of the symbol.

We want to continue intercepting the symbols available on the OS.
So we add forward declarations so that the TSAN interceptors can build.

This is tested with the existing osspinlock_norace test.

Diff Detail

Event Timeline

thetruestblue created this revision.Mar 21 2023, 9:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2023, 9:09 AM
Herald added a subscriber: Enna1. · View Herald Transcript
thetruestblue requested review of this revision.Mar 21 2023, 9:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2023, 9:09 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript

fixed trailing white space issues.

yln accepted this revision.Mar 21 2023, 10:16 AM

LGTM, thanks!

This revision is now accepted and ready to land.Mar 21 2023, 10:16 AM
This revision was landed with ongoing or failed builds.Mar 21 2023, 12:26 PM
This revision was automatically updated to reflect the committed changes.