Skip to content

Commit

Permalink
Abort rather than exiting "normally" if an autoupdate step crashes. (#…
Browse files Browse the repository at this point in the history
…4483)

This avoids producing an LSan leak report for the objects that got
leaked by the crash, which would otherwise scroll all the useful
information about the crash off the terminal.
  • Loading branch information
zygoloid authored Nov 5, 2024
1 parent 2841e9a commit d1733c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion testing/file_test/file_test_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,9 @@ static auto RunAutoupdate(llvm::StringRef exe_path,

pool.wait();
if (crashed) {
return EXIT_FAILURE;
// Abort rather than returning so that we don't get a LeakSanitizer report.
// We expect to have leaked memory if one or more of our tests crashed.
std::abort();
}
llvm::errs() << "\nDone!\n";
return EXIT_SUCCESS;
Expand Down

0 comments on commit d1733c6

Please sign in to comment.