This is an archive of the discontinued LLVM Phabricator instance.

[lsan] Create a dummy SuspendedThreadsList for Fuchsia
AbandonedPublic

Authored by leonardchan on Nov 3 2020, 10:30 AM.

Details

Reviewers
phosek
mcgrathr
Summary

As of d48f2d7c02743571075bb7812bb4c9e634e51ed1, the destructor for SuspendedThreadsList is protected, which leads to this error on our CI builders:

/b/s/w/ir/x/w/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_fuchsia.cpp:35:26: error: temporary of type 'const __sanitizer::SuspendedThreadsList' has protected destructor
        params->callback({}, params->argument);
                         ^
/b/s/w/ir/x/w/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld.h:44:3: note: declared protected here
  ~SuspendedThreadsList() {}
  ^
1 error generated.

Although the threadslists aren't needed for Fuchsia's case, we can just make a dummy SuspendedThreadsList class for Fuchsia with an overriden destructor.

Diff Detail

Event Timeline

leonardchan created this revision.Nov 3 2020, 10:30 AM
Herald added a subscriber: Restricted Project. · View Herald TranscriptNov 3 2020, 10:30 AM
leonardchan requested review of this revision.Nov 3 2020, 10:30 AM

Unsure if this is the best way to go about it, so open to other solutions.

I have made the same change which is slightly simpler, see D90695, so LGTM.

compiler-rt/lib/lsan/lsan_common_fuchsia.cpp
36

This is not necessary, see D90695.

compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_fuchsia.cpp
30

This is not necessary, see D90695.

leonardchan abandoned this revision.Nov 5 2020, 10:24 AM

Abandoned since https://reviews.llvm.org/D90695 fixes this