The default bug view has changed. See this FAQ.

GC: missing barriers in TradeGuts

RESOLVED FIXED in mozilla13

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: terrence, Assigned: terrence)

Tracking

Trunk
mozilla13
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Trigger post barriers when we TradeGuts.  Pre barriers are taken care of already by manually marking.  We need similar treatment for post barriers, taking care to handle fixed slots correctly.
(Assignee)

Comment 1

5 years ago
Created attachment 586561 [details] [diff] [review]
v1
Attachment #586561 - Flags: review?(wmccloskey)
Status: NEW → ASSIGNED
Comment on attachment 586561 [details] [diff] [review]
v1

Review of attachment 586561 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsobj.cpp
@@ +3578,5 @@
> +         * below, in common with the other case.
> +         */
> +        for (size_t i = 0; i < a->numFixedSlots(); ++i) {
> +            Value *slotA = const_cast<Value *>(a->getFixedSlot(i));
> +            Value *slotB = const_cast<Value *>(b->getFixedSlot(i));

I think this would look better if you did:
    HeapValue *slotA = &a->getFixedSlotRef(i);

@@ +3642,5 @@
> +#ifdef JSGC_GENERATIONAL
> +    Shape::writeBarrierPost(a->shape_, (void *)&a->shape_);
> +    Shape::writeBarrierPost(b->shape_, (void *)&b->shape_);
> +    types::TypeObject::writeBarrierPost(a->type_, (void *)&a->type_);
> +    types::TypeObject::writeBarrierPost(b->type_, (void *)&b->type_);

I don't think you need these (void *) casts. I think they're used in gc/Barrier.h because some of the stuff is const.
Attachment #586561 - Flags: review?(wmccloskey) → review+
Also, please don't put two spaces after the period in the comment. See the SpiderMonkey style guide.
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/e3a0eab64d04
https://hg.mozilla.org/mozilla-central/rev/e3a0eab64d04
Target Milestone: --- → mozilla13
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.