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
|
diff --git a/Sources/FuzzilliCli/Profiles/Profile.swift b/Sources/FuzzilliCli/Profiles/Profile.swift
index 900b4e2..c916e84 100644
--- a/Sources/FuzzilliCli/Profiles/Profile.swift
+++ b/Sources/FuzzilliCli/Profiles/Profile.swift
@@ -33,6 +33,35 @@ struct Profile {
let additionalBuiltins: [String: Type]
}
+let serenityProfile = Profile(
+ processArguments: [""],
+
+ processEnv: ["UBSAN_OPTIONS":"handle_segv=0 handle_abrt=0"],
+
+ codePrefix: """
+ function main() {
+ """,
+
+ codeSuffix: """
+ }
+ main();
+ """,
+
+ ecmaVersion: ECMAScriptVersion.es6,
+
+ crashTests: ["fuzzilli('FUZZILLI_CRASH', 0)", "fuzzilli('FUZZILLI_CRASH', 1)"],
+
+ additionalCodeGenerators: WeightedList<CodeGenerator>([]),
+
+ additionalProgramTemplates: WeightedList<ProgramTemplate>([]),
+
+ disabledCodeGenerators: [],
+
+ additionalBuiltins: [
+ "gc" : .function([] => .undefined)
+ ]
+)
+
let profiles = [
"qjs": qjsProfile,
"jsc": jscProfile,
@@ -40,4 +69,5 @@ let profiles = [
"v8": v8Profile,
"duktape": duktapeProfile,
"jerryscript": jerryscriptProfile,
+ "serenity": serenityProfile,
]
|