This is an archive of the discontinued LLVM Phabricator instance.

tsan: intercept clone
ClosedPublic

Authored by dvyukov on Nov 11 2021, 7:21 AM.

Details

Summary

gtest uses clone for death tests and it needs the same
handling as fork to prevent deadlock (take runtime mutexes
before and release them after).

Diff Detail

Event Timeline

dvyukov requested review of this revision.Nov 11 2021, 7:21 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 11 2021, 7:21 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
melver accepted this revision.Nov 11 2021, 7:49 AM
melver added inline comments.
compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
2217

minor: Not sure which style is being followed, but if Google-style, then this should just be 'struct Arg'. I don't see the _t suffix used consistently elsewhere.

This revision is now accepted and ready to land.Nov 11 2021, 7:49 AM
dvyukov updated this revision to Diff 386562.Nov 11 2021, 9:54 AM

s/arg_t/Arg/

dvyukov marked an inline comment as done.Nov 11 2021, 9:55 AM
This revision was landed with ongoing or failed builds.Nov 11 2021, 9:56 AM
Closed by commit rG82de586d4bd7: tsan: intercept clone (authored by dvyukov). · Explain Why
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Nov 11 2021, 10:09 AM

This breaks building on mac (and probably on non-linux in general): http://45.33.8.238/mac/38681/step_4.txt

Please take a look.

This breaks building on mac (and probably on non-linux in general): http://45.33.8.238/mac/38681/step_4.txt

Please take a look.

Hi Nico,

I've just looking at the greendragon email. I've mailed https://reviews.llvm.org/D113693
Thanks for notifying.

Thanks for the quick fix. Bots are happy again :)