Closed Bug 1026931 Opened 10 years ago Closed 10 years ago

ForkJoinNursery crashes on OOM when it could signal the error properly

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(1 file)

The ForkJoinNursery calls CrashAtUnhandlableOOM() in its constructor and within setCurrentChunk(), when trying to allocate memory for the the nursery during initialization or when growing the nursery. In these cases it should return an error indicator - ie the allocations should be fallible - and the caller should propagate the error. In practice this means also that the initialization of ForkJoinContext needs to be split in two, with an explicit initialize method that initializes the ForkJoinNursery and returns a status indicator.
Attached patch Patch (deleted) — Splinter Review
Not much excitement here apart from how to handle failure to expand the nursery, which I hope I have commented adequately.
Attachment #8443429 - Flags: review?(shu)
Comment on attachment 8443429 [details] [diff] [review] Patch Review of attachment 8443429 [details] [diff] [review]: ----------------------------------------------------------------- LGTM. ::: js/src/gc/ForkJoinNursery.cpp @@ +767,5 @@ > // budget is used up. There is a guard in > // Chunk::allocateArena() against the latter case. > return tenured_->arenas.allocateFromArena(evacuationZone_, thingKind); > } else { > + return allocateInTospaceInfallible(thingSize); Didn't see this last time. Preexisting style nit: no else-after-return. ::: js/src/gc/ForkJoinNursery.h @@ +221,5 @@ > // Walk the list of registered slot arrays and free them all. > void sweepHugeSlots(); > > // Set the position/end pointers to correspond to the numbered > + // chunk. Returns fals if the chunk could not be allocated, either Typo 'fals'
Attachment #8443429 - Flags: review?(shu) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: