Closed Bug 829372 Opened 11 years ago Closed 11 years ago

GC: Root analysis is clobbering non-pointer-sized roots

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(1 file)

Attached patch v0Splinter Review
Because we treat all Rooted as Rooted<void*> when doing an analysis, we need to not store the |bool scanned| flag after |T ptr|, even though it is smaller than T.
Attachment #700774 - Flags: review?(sphink)
Comment on attachment 700774 [details] [diff] [review]
v0

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

Very nice cleanup of the field initialization. I'm dumb for not doing that in the first place.

::: js/src/gc/Root.h
@@ +726,5 @@
>      Rooted<T> **stack, *prev;
>  #endif
> +
> +#if defined(JSGC_ROOT_ANALYSIS)
> +    /* Has the rooting analysis ever scanned this Rooted's stack location? */

Can you also mention that it must come before T in order for upcasts to Rooted<void*> to work?
Attachment #700774 - Flags: review?(sphink) → review+
https://hg.mozilla.org/mozilla-central/rev/fa88bbeed9b1
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: