blob: 3641f835dad411cac57cbef66eb70b542148cc23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
// |jit-test| allow-oom; --fuzzing-safe
var lfLogBuffer = `
//corefuzz-dcd-endofdata
//corefuzz-dcd-endofdata
//corefuzz-dcd-endofdata
setJitCompilerOption("ion.warmup.trigger", 4);
var g = newGlobal();
g.debuggeeGlobal = this;
g.eval("(" + function () {
dbg = new Debugger(debuggeeGlobal);
dbg.onExceptionUnwind = function (frame, exc) {
var s = '!';
for (var f = frame; f; f = f.older)
debuggeeGlobal.log += s;
};
} + ")();");
j('Number.prototype.toString.call([])');
//corefuzz-dcd-endofdata
//corefuzz-dcd-endofdata
//corefuzz-dcd-endofdata
//corefuzz-dcd-selectmode 4
//corefuzz-dcd-endofdata
}
//corefuzz-dcd-endofdata
//corefuzz-dcd-selectmode 5
//corefuzz-dcd-endofdata
oomTest(() => i({
new : (true ),
thisprops: true
}));
`;
lfLogBuffer = lfLogBuffer.split('\n');
var lfRunTypeId = -1;
var lfCodeBuffer = "";
while (true) {
var line = lfLogBuffer.shift();
if (line == null) {
break;
} else if (line == "//corefuzz-dcd-endofdata") {
loadFile(lfCodeBuffer);
lfCodeBuffer = "";
loadFile(line);
} else {
lfCodeBuffer += line + "\n";
}
}
if (lfCodeBuffer) loadFile(lfCodeBuffer);
function loadFile(lfVarx) {
try {
if (lfVarx.indexOf("//corefuzz-dcd-selectmode ") === 0) {
lfRunTypeId = parseInt(lfVarx.split(" ")[1]) % 6;
} else {
switch (lfRunTypeId) {
case 4:
oomTest(function() {
let m = parseModule(lfVarx);
});
break;
default:
evaluate(lfVarx);
}
}
} catch (lfVare) {}
}
|