Closed Bug 491734 Opened 16 years ago Closed 16 years ago

Hookup OOM for MMGC_USE_SYSTEM_MALLOC defined case

Categories

(Tamarin Graveyard :: Garbage Collection (mmGC), defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED
flash10.1

People

(Reporter: rishah, Assigned: lhansen)

References

Details

Attachments

(1 file)

Currently, when MMGC_USE_SYSTEM_MALLOC is define the global operator new invokes VMPI_alloc that could return NULL. OOM hooks need to be added under this case to abort if VMPI_alloc returns NULL.
Assignee: nobody → rishah
Status: NEW → ASSIGNED
Flags: flashplayer-qrb+
Priority: -- → P2
Target Milestone: --- → flash10.x
What do clients (Air?) assume if VMPI_alloc returns NULL? Should we hook into our OOM system - run GC, decommit pages, etc; abort in the last instance? Basically remains investigative for now. We need to figure out how the profiler deals with this and if the profiler should be able to shut down the system or if it should just shut itself off.
Assignee: rishah → nobody
Flags: flashplayer-triage+
Blocks: 489345
Severity: normal → blocker
OS: Mac OS X → All
Priority: P2 → P1
Hardware: x86 → All
Assignee: nobody → lhansen
Attached patch PatchSplinter Review
This fixes the problem by creating a hook in GCHeap for SystemNew to signal OOM; restructuring the code around SystemNew a little bit; and it also fixes one bug where SystemDelete would call a profiling method on a NULL pointer during shutdown.
Attachment #403216 - Flags: review?(rishah)
ran the vm testsuite with AVMFEATURE_USE_SYSTEM_MALLOC with and without the patch. In mainline (without patch) the mmgc/outofmemory.as testcase fails due to the vm crashing. With the patch the testcase passes since the vm exits gracefully when OOM is reached with message error: out of memory and an exit code 128.
Flags: in-testsuite+
Attachment #403216 - Flags: review?(rishah) → review+
redux changeset: 2614:1d34004af549
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: