Closed
Bug 560427
Opened 14 years ago
Closed 14 years ago
Abort() may be called from AllocNoOOM()
Categories
(Tamarin Graveyard :: Virtual Machine, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
flash10.1
People
(Reporter: bgetlin, Assigned: bgetlin)
Details
Attachments
(1 file)
1.16 KB,
text/plain
|
treilly
:
review+
lhansen
:
superreview+
|
Details |
#4 0x184c02ce in MMgc::GCHeap::Abort (this=0x18a80310) at /Users/bgetlin/depot/users/bgetlin/volatile/Argo_Athena_GMC/code/products/player/osx/../../../third_party/avmplus/MMgc/GCHeap.cpp:2297 #5 0x184c0519 in MMgc::GCHeap::CheckForHardLimitExceeded (this=0x18a80310) at /Users/bgetlin/depot/users/bgetlin/volatile/Argo_Athena_GMC/code/products/player/osx/../../../third_party/avmplus/MMgc/GCHeap.cpp:700 #6 0x184c19d4 in MMgc::GCHeap::CheckForMemoryLimitsExceeded (this=0x18a80310) at /Users/bgetlin/depot/users/bgetlin/volatile/Argo_Athena_GMC/code/products/player/osx/../../../third_party/avmplus/MMgc/GCHeap.cpp:449 #7 0x184c1db0 in MMgc::GCHeap::Alloc (this=0x18a80310, size=1, flags=31, alignment=1) at /Users/bgetlin/depot/users/bgetlin/volatile/Argo_Athena_GMC/code/products/player/osx/../../../third_party/avmplus/MMgc/GCHeap.cpp:363 #8 0x184b65fa in MMgc::GCHeap::AllocNoOOM (this=0x18a80310, size=1, flags=15) at GCHeap.h:401
Assignee | ||
Comment 1•14 years ago
|
||
Attachment #440110 -
Flags: review?(treilly)
Assignee | ||
Updated•14 years ago
|
Attachment #440110 -
Flags: superreview?(lhansen)
Updated•14 years ago
|
Attachment #440110 -
Flags: superreview?(lhansen) → superreview+
Comment 2•14 years ago
|
||
Comment on attachment 440110 [details]
GCHeap::Alloc() patch
I don't see how the second part of this patch is related to the bug, if its related please explain, otherwise log a new bug.
Attachment #440110 -
Flags: review?(treilly) → review-
Assignee | ||
Comment 3•14 years ago
|
||
It's important because removing the "CheckForMemoryLimitsExceeded()" in the first part, we're never checking to see if we've breached softLimit by making this "canFail" allocation. This is necessary because our policy is to release this memory back to GCHeap when this occurs. Since HardLimit can be breached this way too, but we're not allowed to trigger Abort(), we want to follow the same logic here.
Updated•14 years ago
|
Attachment #440110 -
Flags: review- → review+
Brent, please submit to Argo, TR-Argo, and TR today. Thanks.
Assignee: nobody → bgetlin
Status: NEW → ASSIGNED
Flags: flashplayer-qrb+
Target Milestone: --- → flash10.1
Comment 5•14 years ago
|
||
tamarin-redux: changeset: 4554:ebc7d2ca6bc0 user: Tommy Reilly <treilly@adobe.com> date: Wed Apr 21 13:42:35 2010 -0400 summary: Fix 560427, pushing for bgetlin (r=treilly,sr=lhansen) tamain-redux-argo: changeset: 4015:fc8a98548a06 user: Tommy Reilly <treilly@adobe.com> date: Wed Apr 21 13:38:43 2010 -0400 summary: Fix 560427, pushing for bgetlin (r=treilly,sr=lhansen)
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
QA Contact: vm → dschaffe
Comment 6•14 years ago
|
||
is there a testcase we can use for regression testing and marking this bug verified?
Comment 7•14 years ago
|
||
A selftest can be created that calls AllocNoOOM and verifies that NULL is returned instead of triggering abort.
Comment 8•14 years ago
|
||
Added selftest code the ST_mmgc_gcheap.st (below). The tests shows with Alloc(...,kCanFail) in a loop after several successful allocations Alloc() returns NULL and does not trigger OOM. marking bug as verified. A problem is the test code does not free memory so the next test fails. any ideas how I can free the allocated memory after the test finshes? here is the test code: added to extensions/ST_mmgc_gcheap.st: %%test AllocNoOOM GCHeap *heap; heap = GCHeap::GetGCHeap(); int ctr=0; char didFail=0; while (true) { void *item=heap->AllocNoOOM(10,GCHeap::kCanFail); //printf("allocs %d %d\n",ctr++,item); if (item==NULL) { didFail=1; break; } } %%verify didFail == 1
Status: RESOLVED → VERIFIED
Comment 9•14 years ago
|
||
(In reply to comment #8) > any ideas how I can free the allocated memory after the test finshes? Put them in a list and then traverse the list and free the memory after the loop? (Ping me offline if you need more help than that.)
You need to log in
before you can comment on or make changes to this bug.
Description
•