Fix jsonfindptrs "internal error" false positive

This commit is contained in:
Nigel Tao committed 2022-12-08 15:07:42 +11:00
1 parent dee65c0e61
commit e915543f09
3 files changed
+10 -1

No files matched your search

+3
View File
@@ -381,6 +381,9 @@ compute_exit_code(std::string status_msg) {
// (other non-zero exit codes). Specifically, exit code 2 for internal
// invariant violation, exit code 139 (which is 128 + SIGSEGV on x86_64
// linux) for a segmentation fault (e.g. null pointer dereference).
if (size_t i = status_msg.find('='); i != std::string::npos) {
status_msg = status_msg.substr(0, i);
}
return (status_msg.find("internal error:") != std::string::npos) ? 2 : 1;
}