Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions fuzztest/internal/runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,14 @@ static void HandleCrash(int signum, siginfo_t* info, void* ucontext) {
Runtime& runtime = Runtime::instance();
runtime.SetCrashTypeIfUnset(std::string(it->signame));
const bool has_old_handler = HasCustomHandler(it->action);
bool should_ignore_reporting = false;
// SIGTRAP generated by perf_event_open(sigtrap=1) may be used by
// debugging/analysis tools, so don't consider these as a crash.
if (!has_old_handler || signum != SIGTRAP ||
(info->si_code != TRAP_PERF && info->si_code != SI_TIMER)) {
if (has_old_handler && signum != SIGTRAP &&
(info->si_code == TRAP_PERF || info->si_code == SI_TIMER)) {
should_ignore_reporting = true;
}
if (!should_ignore_reporting) {
// Dump our info first.
runtime.PrintReport(&signal_out_sink);
// The old signal handler might print important messages (e.g., strack
Expand Down
Loading