blob: cd5532fde41a4973f56853b7fbfdf44f5344ec29 [file] [log] [blame]
//@ runDefault("--jitPolicyScale=0")
function makeTmp() {
let tmp = {a: 1};
gc();
tmp.__proto__ = {};
return tmp;
}
function foo(tmp, obj) {
for (let k in tmp) {
tmp.__proto__ = {};
gc();
obj.__proto__ = {};
var result = obj[k];
return result;
}
}
foo(makeTmp(), {});
let memory = new Uint32Array(100);
memory[0] = 0x1234;
let fooResult = foo(makeTmp(), memory);
var result = $vm.value(fooResult);
if (result != "Undefined")
throw "FAIL";