Skip to content

Commit 74ccbab

Browse files
committed
Fix CI on windows:
This tells Windows not to invoke WER/crash reporting when abort() is called
1 parent 21362c6 commit 74ccbab

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Parser.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*/
1717

1818
#include <cstdint>
19+
#include <cstdlib>
20+
#include <exception>
1921
#include <string>
2022
#include <iostream>
2123
#include <fstream>
@@ -281,6 +283,10 @@ class ParsedTraces {
281283

282284
int main(int argc, char **argv)
283285
{
286+
// Replace the default terminate handler so that any unhandled exception
287+
// causes an immediate exit with a non-zero code instead of invoking the
288+
// platform crash reporter (WER on Windows), which would hang in CI.
289+
std::set_terminate([]{ _exit(1); });
284290
if (argc < 2)
285291
throw std::runtime_error(
286292
"Wrong argument. Usage: ./" + std::string(argv[0]) + " trace_directory"

0 commit comments

Comments
 (0)