Closed Bug 307273 Opened 19 years ago Closed 19 years ago

Locking doesn't always add objects to rt->gcLocksHash

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

VERIFIED INVALID
mozilla1.8beta4

People

(Reporter: mrbkap, Assigned: brendan)

Details

(Keywords: js1.6)

This came out of an IRC discussion about bug 299205:

14:28 < brendan> <brendan> bz: locking (pinning) a gc-thing should, in the
                 case of the object, always add it to the rt->gcLocksHash
                 table
14:29 < brendan> locking alas does not do that -- it first sets the lock
                 bit
14:29 < brendan> or i should say, tests it
14:29 < bz> which means what in practice?
14:29 < brendan> if it can just flip that bit, it avoids the hash table
                 update
14:29 < bz> ok....
14:29 < brendan> that means that if the object being 
14:30 < brendan> which means they may be GC'ed if also unreachable
14:30 < brendan> which leaves this object with dangling refs in its slots
                 vector
14:30 < brendan> and maybe in its private data
14:29 < brendan> it will be marked, and its kids too
14:29 < brendan> but if it's not reachable, locking that just sets the bit
                 fails to update rt->gcLocksHash, which is the *only* way
                 to reach that object
14:29 < brendan> the object won't be GC'ed
14:30 < brendan> because GCF_LOCK protects it
14:30 < brendan> but its kids won't be marked
I'll get this in tonight if it's safe enough.

/be
Assignee: general → brendan
Flags: blocking1.8b5+
Keywords: js1.6
OS: Linux → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.8beta4
Well, duh.  Locking *does* always add objects to rt->gcLocksHash -- my memory
was of the bad intermediate state I perpetrated, which shaver fixed in bug 296006.

So this bug is INVALID -- sorry, my fault.  And I think the only effect that bz
saw leading to a crash was the poking rt->gcPoke'ing done by js_UnlockGCThingRT.
 Boris, holler if that leaves a mystery unsolved.

/be
Status: NEW → RESOLVED
Closed: 19 years ago
Flags: blocking1.8b5+
Resolution: --- → INVALID
No, I think things are happy here...
Verifying.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.