Closed Bug 951722 Opened 11 years ago Closed 11 years ago

GenerationalGC: Add asserts that hash table postbarriers are working

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(2 files)

For hashtables that are not testable from JS code, add assertions that our postbarriers have worked correctly.
Add assertions for debug scopes.
Attachment #8349517 - Flags: review?(terrence)
Add assertions for new type objects table.
Attachment #8349518 - Flags: review?(terrence)
Comment on attachment 8349517 [details] [diff] [review] check-debug-scopes Review of attachment 8349517 [details] [diff] [review]: ----------------------------------------------------------------- Great! r=me ::: js/src/vm/ScopeObject.cpp @@ +1697,5 @@ > +void > +DebugScopes::checkHashTables(JSRuntime *runtime) > +{ > + /* > + * This is called from MarkRuntime after the storebuffer has been marked to This is called directly from StoreBuffer::mark now, did you mean to update this comment? ::: js/src/vm/ScopeObject.h @@ +747,5 @@ > public: > void mark(JSTracer *trc); > void sweep(JSRuntime *rt); > +#if defined(DEBUG) && defined(JSGC_GENERATIONAL) > + void checkHashTables(JSRuntime *rt); This is a bit generic; how about checkHashTablesAfterMovingGC?
Attachment #8349517 - Flags: review?(terrence) → review+
Comment on attachment 8349518 [details] [diff] [review] check-new-type-objects Review of attachment 8349518 [details] [diff] [review]: ----------------------------------------------------------------- Excellent! r=me ::: js/src/jscompartment.h @@ +247,5 @@ > js::types::TypeObjectWithNewScriptSet newTypeObjects; > js::types::TypeObjectWithNewScriptSet lazyTypeObjects; > void sweepNewTypeObjectTable(js::types::TypeObjectWithNewScriptSet &table); > +#if defined(DEBUG) && defined(JSGC_GENERATIONAL) > + void checkNewTypeObjectTable(); Same comment as before; checkNewTypeObjectTableAfterMovingGC.
Attachment #8349518 - Flags: review?(terrence) → review+
This causes failures on inbound, although I can't repro locally yet: TEST-UNEXPECTED-FAIL | js/src/jit-test/tests/gc/bug-880776.js | --no-baseline --no-ion INFO stderr 2> Assertion failure: !IsInsideNursery(rt, proto.toObject()), at /builds/slave/m-in_l64-d_sm-ggc-000000000000/src/js/src/jsinfer.cpp:3976 TEST-UNEXPECTED-FAIL | js/src/jit-test/tests/gc/bug-880776.js | --no-baseline --no-ion --no-ti INFO stderr 2> Assertion failure: !IsInsideNursery(rt, proto.toObject()), at /builds/slave/m-in_l64-d_sm-ggc-000000000000/src/js/src/jsinfer.cpp:3976 TEST-UNEXPECTED-FAIL | js/src/jit-test/tests/gc/bug-880776.js | INFO stderr 2> Assertion failure: !IsInsideNursery(rt, proto.toObject()), at /builds/slave/m-in_l64-d_sm-ggc-000000000000/src/js/src/jsinfer.cpp:3976 make: *** [check-jit-test] Error 2
Backed out asserts for new type objects table: https://hg.mozilla.org/integration/mozilla-inbound/rev/e2b59ec2df63
Whiteboard: [leave open]
The problem is that StoreBuffer::mark() gets called when verifying post barriers, at which time it does not actually mark the targets of edges in the buffer. I'll move the checking code to Nursery::collect() instead.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: