Assertion failure: compartment mismatched, at ../jscntxtinlines.h:153 with dumpStack

RESOLVED FIXED in mozilla15

Status

()

Core
JavaScript Engine
--
critical
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: decoder, Assigned: jorendorff)

Tracking

(Blocks: 1 bug, {assertion, testcase})

Trunk
mozilla15
x86_64
Linux
assertion, testcase
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
The following code asserts on mozilla-central revision edf8075b0333 (options -n -m -a):


var g = newGlobal('new-compartment');
var dbg = new Debugger(g);
dbg.onDebuggerStatement = function (frame) {
    assertEq(dumpStack(), true);
};
g.eval("function f(a, [b, c], {x: [y], z: w}, {q}) { debugger; }");
g.eval("f(1, [2, 3], {x: [4], z: 5}, {q: 6});");


Not sure if this is really a bug, or just a problem because of "dumpStack". There are way too many shell builtins floating around in global namespace :(
(In reply to Christian Holler (:decoder) from comment #0)
> There are way too many shell builtins floating around in global namespace :(

Has anybody proposed making a Shell object (akin to the Math object)?
(Assignee)

Comment 2

5 years ago
Reduced:
  var g = newGlobal('new-compartment');
  g.f = function () { dumpStack(); };
  g.eval("f();");

The comment on DumpStack in the source code says:
/*
 * This shell function is temporary (used by testStackIter.js) and should be
 * removed once JSD2 lands wholly subsumes the functionality here.
 */

JSD2 clearly isn't there yet, so I'll fix the bug. 2-line patch coming.
Summary: [jsdbg2] Assertion failure: compartment mismatched, at ../jscntxtinlines.h:153 → Assertion failure: compartment mismatched, at ../jscntxtinlines.h:153 with dumpStack
(Assignee)

Comment 3

5 years ago
Created attachment 622037 [details] [diff] [review]
v1
Attachment #622037 - Flags: review?(luke)

Comment 4

5 years ago
Comment on attachment 622037 [details] [diff] [review]
v1

wrap all the values!
Attachment #622037 - Flags: review?(luke) → review+
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d8f95bbf161b
https://hg.mozilla.org/mozilla-central/rev/d8f95bbf161b

Should this have a test?
Flags: in-testsuite?
Target Milestone: --- → mozilla15
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Reporter)

Updated

5 years ago
Duplicate of this bug: 723068
(Reporter)

Comment 8

5 years ago
Automatically extracted testcase for this bug was committed:

https://hg.mozilla.org/mozilla-central/rev/efaf8960a929
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.