This is an archive of the discontinued LLVM Phabricator instance.

[GWP-ASan] Stub out backtrace/signal functions on Fuchsia
ClosedPublic

Authored by cryptoad on Oct 31 2020, 11:09 AM.

Details

Summary

The initial version of GWP-ASan on Fuchsia doesn't support crash and
signal handlers, so this just adds empty stubs to be able to compile
the project on the platform.

Diff Detail

Event Timeline

cryptoad created this revision.Oct 31 2020, 11:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 31 2020, 11:09 AM
Herald added subscribers: Restricted Project, phosek. · View Herald Transcript
cryptoad requested review of this revision.Oct 31 2020, 11:09 AM
mcgrathr accepted this revision.Nov 2 2020, 11:10 AM

lgtm

compiler-rt/lib/gwp_asan/optional/segv_handler_fuchsia.cpp
16

Another option is [[maybe_unused]] on each parameter.

This revision is now accepted and ready to land.Nov 2 2020, 11:10 AM
hctim accepted this revision.Nov 2 2020, 12:39 PM

LGTM w/ nit.

compiler-rt/lib/gwp_asan/optional/segv_handler_fuchsia.cpp
16

Prefer

void installSignalHandlers(gwp_asan::GuardedPoolAllocator * /* GPA */, Printf_t /* Printf */,
                           PrintBacktrace_t /* PrintBacktrace */,
                           SegvBacktrace_t /* SegvBacktrace */) {
cryptoad updated this revision to Diff 302375.Nov 2 2020, 12:46 PM

Addressing Mitch's request.

hctim accepted this revision.Nov 2 2020, 12:46 PM
phosek added inline comments.Nov 2 2020, 1:12 PM
compiler-rt/lib/gwp_asan/optional/segv_handler_fuchsia.cpp
16

You can also just omit parameter names altogether if they're unused.

This revision was automatically updated to reflect the committed changes.