This is an archive of the discontinued LLVM Phabricator instance.

tsan: add a stress test
ClosedPublic

Authored by dvyukov on Sep 24 2021, 6:58 AM.

Details

Summary

The stress test does various assorted things
(memory accesses, function calls, atomic operations,
thread creation/join, intercepted libc calls)
in multiple threads just to stress various parts
of the runtime.

Diff Detail

Event Timeline

dvyukov requested review of this revision.Sep 24 2021, 6:58 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2021, 6:58 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
melver accepted this revision.Sep 24 2021, 7:29 AM
melver added inline comments.
compiler-rt/test/tsan/stress.cpp
18

Probably better if stop is volatile to not leave this to chance, assuming you don't want this to be atomic in case it could introduce unwanted effects.

Or add a compiler barrier.

This revision is now accepted and ready to land.Sep 24 2021, 7:29 AM
dvyukov updated this revision to Diff 374848.Sep 24 2021, 7:42 AM

made stop volatile

dvyukov marked an inline comment as done.Sep 24 2021, 7:43 AM
This revision was landed with ongoing or failed builds.Sep 24 2021, 7:46 AM
This revision was automatically updated to reflect the committed changes.

FTR, I've sent https://reviews.llvm.org/D110423 to fix MacOS buildbots.