diff --git a/js/src/jscntxt.cpp b/js/src/jscntxt.cpp index b91c69f8115..07c22fe19fc 100644 --- a/js/src/jscntxt.cpp +++ b/js/src/jscntxt.cpp @@ -352,6 +352,15 @@ PopulateReportBlame(JSContext *cx, JSErrorReport *report) void js_ReportOutOfMemory(ThreadSafeContext *cxArg) { +#ifdef JS_MORE_DETERMINISTIC + /* + * OOMs are non-deterministic, especially across different execution modes + * (e.g. interpreter vs JIT). In more-deterministic builds, print to stderr + * so that the fuzzers can detect this. + */ + fprintf(stderr, "js_ReportOutOfMemory called\n"); +#endif + if (cxArg->isForkJoinSlice()) { cxArg->asForkJoinSlice()->setPendingAbortFatal(ParallelBailoutOutOfMemory); return;