Page MenuHomePhabricator

[libFuzzer] Ignore synthetic exceptions on Fuchsia
ClosedPublic

Authored by aarongreen on May 21 2019, 6:24 PM.

Details

Summary

Fuchsia has several exceptions which are merely informational and should not be treated as crashes. This patch puts logic that read from the exception port and handled the exception in a loop, and ignores non-exceptions and informational exceptions.

Diff Detail

Repository
rL LLVM

Event Timeline

aarongreen created this revision.May 21 2019, 6:24 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
Herald added subscribers: llvm-commits, Restricted Project. · View Herald Transcript
mcgrathr accepted this revision.May 21 2019, 6:31 PM

lgtm with one nit: either change to an assert or improve the comment to clarify what other cases are expected

compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp
244 ↗(On Diff #200623)

I think !ZX_PKT_IS_EXCEPTION here is unexpected and would indicate a bug.
There should be no packets received except the ones you've asked for.
Probably you should just assert that it is.

This revision is now accepted and ready to land.May 21 2019, 6:31 PM

Address mcgrathr's nit.

aarongreen marked an inline comment as done.May 21 2019, 7:06 PM
This revision was automatically updated to reflect the committed changes.