Closed Bug 1049440 Opened 10 years ago Closed 10 years ago

jsapi-test testGCOutOfMemory crashes with zeal mode 2

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 1135141

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

$ JS_GC_ZEAL=2 ./default-optdebug-build/jsapi-tests testGCOutOfMemory testGCOutOfMemory <no filename>:0:out of memory TEST-UNEXPECTED-FAIL | testGCOutOfMemory | Failed to initialize. WARNING: YOU ARE LEAKING THE WORLD (at least one JSRuntime and everything alive inside it, that is) AT JS_ShutDown TIME. FIX THIS! 1 unexpected failure. Assertion failure: CurrentThreadCanAccessRuntime(cx->runtime()), at /Users/jon/work/compacting/js/src/jscntxt.cpp:1341 Segmentation fault: 11 There are two problems here: firstly that the test fails, secondly that it crashes the test harness.
Attached patch fix-jsapi-test-crash (deleted) — Splinter Review
This is a patch to fix the first problem. I moved the definition of uninit() next to init() and updated it to make it clean up properly if init() failed. The important change though is to call uninit() immediately if init() fails rather than waiting for this to happen in the test destructor, by which time JS_ShutDown() has already run. Output is now merely: testGCOutOfMemory <no filename>:0:out of memory TEST-UNEXPECTED-FAIL | testGCOutOfMemory | Failed to initialize. 1 unexpected failure.
Attachment #8468367 - Flags: review?(luke)
(In reply to Jon Coppeard (:jonco) from comment #1) s/first problem/second problem/ above.
Attachment #8468367 - Flags: review?(luke) → review+
I independently found the second problem and fixed it in bug 1135141.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Removing leave-open keyword from resolved bugs, per :sylvestre.
Keywords: leave-open
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: