This is an archive of the discontinued LLVM Phabricator instance.

[hwasan] Stress test for thread creation.
ClosedPublic

Authored by eugenis on May 5 2021, 12:39 PM.

Details

Summary

This test has two modes - testing reused threads with multiple loops of
batch create/join, and testing new threads with a single loop of
create/join per fork.

The non-reuse variant catches the problem that was fixed in D101881 with
a high probability.

Diff Detail

Event Timeline

eugenis requested review of this revision.May 5 2021, 12:39 PM
eugenis created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2021, 12:39 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
hctim accepted this revision.May 5 2021, 1:17 PM

LGTM w/ nits

compiler-rt/test/hwasan/TestCases/Linux/create-thread-stress.cpp
3

Can you leave a comment pointing to D101881 for posterity?

60

missing return 0; from main for non-reuse non-failure mode and reuse mode

This revision is now accepted and ready to land.May 5 2021, 1:17 PM
vitalybuka accepted this revision.May 5 2021, 2:30 PM
eugenis updated this revision to Diff 344546.May 11 2021, 1:04 PM
eugenis marked an inline comment as done.

Added a comment in the test.

compiler-rt/test/hwasan/TestCases/Linux/create-thread-stress.cpp
60

Not necessary in C++: main is special.

This revision was landed with ongoing or failed builds.May 11 2021, 1:11 PM
This revision was automatically updated to reflect the committed changes.