Add a new thread access lock around the lifetime of the GCHeap for protection during OOM.

VERIFIED FIXED in flash10.1

Status

P2
normal
VERIFIED FIXED
9 years ago
9 years ago

People

(Reporter: bgetlin, Assigned: lhansen)

Tracking

unspecified
flash10.1

Details

(Whiteboard: Has patch)

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Build Identifier: 

- Create a new static spinlock on the GCHeap Class.
- Create static methods for utilizing the new spinlock
- Protect the GCHeap refcount by obtaining the new spinlock before increment/decrement.
- Obtain the new spinlock during the "ENTER" macros so that the heap cannot be destroyed before setting the new EnterFrame 

Reproducible: Sometimes
(Reporter)

Comment 1

9 years ago
Created attachment 408450 [details] [diff] [review]
Patch

P4 change : 594536
Attachment #408450 - Flags: review?(lhansen)
(Assignee)

Comment 2

9 years ago
Substantive:

- Ideally Enter() would test that the lock is indeed held by the calling
  thread but I don't think we have an API for this now.

Stylistic:

- GCHeap::EnterDestroy should be called EnterLockDestroy to be symmetric
  with EnterLockInit; no reason why it should not also be static; no reason
  why it needs to be inline.
- GCHeap::EnterLockInit: never compare a boolean to false, always use the
  variable name by itself or prefixed by '!'
- GCHeap::Leave: blank lines inserted for no apparent reason
Status: UNCONFIRMED → ASSIGNED
Component: Virtual Machine → Garbage Collection (mmGC)
Ever confirmed: true
OS: Windows Vista → All
Priority: -- → P2
QA Contact: vm → gc
Hardware: x86 → All
Target Milestone: --- → flash10.1
(Assignee)

Updated

9 years ago
Attachment #408450 - Flags: review?(lhansen) → review+
(Assignee)

Comment 3

9 years ago
Created attachment 408564 [details] [diff] [review]
Identical patch, but in proper format
Attachment #408450 - Attachment is obsolete: true
(Assignee)

Updated

9 years ago
Assignee: nobody → lhansen
(Assignee)

Updated

9 years ago
Whiteboard: Has patch
(Assignee)

Comment 4

9 years ago
Created attachment 408570 [details] [diff] [review]
Slightly reengineered following comments; fixes for avmshell too
Attachment #408564 - Attachment is obsolete: true
(Assignee)

Comment 5

9 years ago
redux changeset:   2882:0e4af8807e23
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED

Comment 6

9 years ago
Engineering work item.  Marking as verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.