Closed Bug 1287086 Opened 8 years ago Closed 8 years ago

IONFLAGS=logs causes Assertion failure: fallibleScope_ ([OOM] Cannot allocate a new chunk in an infallible scope.)

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: nbp, Assigned: nbp)

References

Details

Attachments

(1 file)

This error message is made to catch any allocation issue which does not ensure that we have enough ballast space.

As this code is not used in production, maybe we can just disable this method of reporting OOM on the C1Spewer as well as the JSONSpewer.
The LSprinter already check for fallible allocations, but as it reuses the
LifoAlloc of the compiler, it inherits the infallible aspect of it.

Thus we have to explicit that we use the LifoAlloc as a fallible allocator
in debug builds.
Attachment #8771397 - Flags: review?(hv1989)
Comment on attachment 8771397 [details] [diff] [review]
Use LifoAlloc::AutoFallibleScope in LSprinter::put.

Review of attachment 8771397 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/vm/Printer.cpp
@@ +533,5 @@
>      Chunk* last = reinterpret_cast<Chunk*>(alloc_->alloc(allocLength));
>      if (!last) {
>          reportOutOfMemory();
>          return origLen - len;
>      }

Please put the this snippit in it's own scope. That way the fallible scope is only present for those few lines, instead of the full function.
Attachment #8771397 - Flags: review?(hv1989) → review+
Pushed by npierron@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/895a11230f50
Use LifoAlloc::AutoFallibleScope in LSprinter::put. r=h4writer
https://hg.mozilla.org/mozilla-central/rev/895a11230f50
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: