This is an archive of the discontinued LLVM Phabricator instance.

[lsan][Darwin][nfc] Fix thread vector size
ClosedPublic

Authored by lgrey on Jul 15 2022, 12:41 PM.

Details

Summary

The reserve constructor was removed in 44f55509d75d8c67077810bb6d9f3bedaea05831 but this one was missed.
As a result, we attempt to iterate through 1024 threads each time.

Diff Detail

Event Timeline

lgrey created this revision.Jul 15 2022, 12:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 12:41 PM
Herald added a subscriber: Enna1. · View Herald Transcript
lgrey requested review of this revision.Jul 15 2022, 12:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 12:41 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
vitalybuka added inline comments.
compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cpp
32–33

threads_() is NOOP, as it already has default constructor
reserve is not needed as InternalMmapVector will reserve 4k on the first pushback

lgrey updated this revision to Diff 445127.Jul 15 2022, 2:02 PM

Changed to =default

vitalybuka accepted this revision.Jul 15 2022, 2:16 PM
This revision is now accepted and ready to land.Jul 15 2022, 2:16 PM
This revision was automatically updated to reflect the committed changes.