Skip to content

Commit

Permalink
Bug 1860767 - Replace MOZ_ReportCrash call for AutoEnterOOMUnsafeRegi…
Browse files Browse the repository at this point in the history
…on with fprintf. r=jonco, a=dsmith

According to bug 1859737, there are some issues with the stack dumping code on Windows
and the goal is to stop defining `MOZ_ReportCrash` in non-debug builds.
For `AutoEnterOOMUnsafeRegion` it seems simplest to do our own printf.

Differential Revision: https://phabricator.services.mozilla.com/D191735
  • Loading branch information
jandem committed Oct 24, 2023
1 parent 19c0f2c commit 6b31dc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/vm/JSContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ void AutoEnterOOMUnsafeRegion::crash(const char* reason) {
// In non-DEBUG builds MOZ_CRASH normally doesn't print to stderr so we have
// to do this explicitly (the jit-test allow-unhandlable-oom annotation and
// fuzzers depend on it).
MOZ_ReportCrash(msgbuf, __FILE__, __LINE__);
fprintf(stderr, "Hit MOZ_CRASH(%s) at %s:%d\n", msgbuf, __FILE__, __LINE__);
#endif
MOZ_CRASH_UNSAFE(msgbuf);
}
Expand Down

0 comments on commit 6b31dc6

Please sign in to comment.