Closed
Bug 811572
Opened 13 years ago
Closed 12 years ago
IonMonkey: Differential Testing: Getting different typeof result with schedulegc
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: decoder, Unassigned)
References
Details
(Keywords: regression, sec-high, testcase)
The following testcase shows different behavior with options ---ion-eager vs. no options on m-c revision 1b0226622e94:
var gTestcases = new Array();
var gTc = gTestcases.length;
function TestCase(n, d, e, a) {
this.expect = e;
this.actual = a;
gTestcases[gTc++] = this;
function getTestCaseResult(expected, actual) {
if (typeof expected != typeof actual)
return true;
}
for ( gTc=0; gTc < gTestcases.length; gTc++ ) {
gTestcases[gTc].passed = writeTestCaseResult(
gTestcases[gTc].expect,
gTestcases[gTc].actual,
gTestcases[gTc].description
);
}
function writeTestCaseResult( expect, actual, string ) {
var passed = getTestCaseResult( expect, actual );
print(passed);
}
}
function InstanceOf( object, constructor ) {
return object instanceof constructor;
}
function Employee ( name, dept ) {
this.name = name || "";
this.dept = dept || "general";
}
function WorkerBee ( name, dept, projs ) {
this.base = Employee;
}
function Engineer ( name, projs, machine ) {
schedulegc(10);
this.base( name, "engineering", projs )
}
Engineer.prototype = new WorkerBee();
var pat = new Engineer();
new TestCase("", "InstanceOf( pat, WorkerBee )", true, InstanceOf( pat, Object ));
$ debug64/js --ion-eager test.js
true
$ debug64/js test.js
undefined
I'm marking this s-s because schedulegc is involved in the test.
Reporter | ||
Comment 1•13 years ago
|
||
Different test, but likely the same bug, and shorter (and contains Ninjas!):
function Person( ){}
function Ninja() {}
Ninja.prototype = new Person();
var person = new Person();
var bindNinja = Ninja.bind({});
function test(v, v2) {
return v instanceof v2;
}
schedulegc(10);
assertEq(test(new Ninja(), bindNinja), true);
Probably sec-high, despite the ninjas and gc I'm suspecting something softer than a critical memory error.
Flags: needinfo?(dvander)
![]() |
||
Comment 5•13 years ago
|
||
autoBisect shows this is probably related to the following changeset:
The first good revision is:
changeset: 113229:6ba78023b367
user: Brian Hackett
date: Wed Nov 14 06:46:31 2012 -0800
summary: Eagerly generate a single copy of Ion stubs and wrappers, bug 786146. r=dvander
Brian, did bug 786146 likely fix this?
Flags: needinfo?(bhackett1024)
Comment 6•13 years ago
|
||
I doubt it, bug 786146 just changed how many GC things are allocated when initially compiling Ion code and will perturb schedulegc calls (testcases which use this are ultra fragile).
Flags: needinfo?(bhackett1024)
Reporter | ||
Comment 7•12 years ago
|
||
This doesn't reproduce for me anymore on any branch that includes IonMonkey, so marking as WFM.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Updated•10 years ago
|
Group: core-security → core-security-release
Updated•8 years ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•