llvm.org GIT mirror llvm / 71c2411
not: Only consider exit code 3 to be a crash with --crash This fixes Clang's test/Index/comment-xml-schema.c with Cygwin's xmllint.exe, which uses exit(3) for XML validation failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211550 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Kleckner 5 years ago
1 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
3232 int Result = sys::ExecuteAndWait(Program, argv, nullptr, nullptr, 0, 0,
3333 &ErrMsg);
3434 #ifdef _WIN32
35 // Handle abort() in msvcrt -- It has exit code as 3.
36 // abort(), aka unreachable, may be handled as crash.
37 // FIXME: Could we move this into Win32/Program.inc?
38 if (Result == 3)
35 // Handle abort() in msvcrt -- It has exit code as 3. abort(), aka
36 // unreachable, should be recognized as a crash. However, some binaries use
37 // exit code 3 on non-crash failure paths, so only do this if we expect a
38 // crash.
39 if (ExpectCrash && Result == 3)
3940 Result = -3;
4041 #endif
4142 if (Result < 0) {