Skip to content

Commit

Permalink
Temporary fix for crash at shutdown on Windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodasilva committed Feb 13, 2022
1 parent fef9174 commit f56ae2f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/js_api_process.cc
Expand Up @@ -236,7 +236,12 @@ void ProcessApi::Exit(const v8::FunctionCallbackInfo<v8::Value>& info) {
code = info[0].As<v8::Int32>()->Value();
}
if (Args().headless || code != 0) {
std::exit(code);
// TODO: this crashes on Github when running tests.
// The crash reproes under high contention on debug builds with MSVC.
// It's a crash in a destructor at shutdown; using std::quick_exit to
// bypass atexit callbacks as a temporary workaround.
// std::exit(code);
std::quick_exit(code);
} else {
JsApi* api = JsApi::Get(info.GetIsolate());
glfwSetWindowShouldClose(api->glfw_window(), GLFW_TRUE);
Expand Down

0 comments on commit f56ae2f

Please sign in to comment.