mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-01 07:35:02 +03:00
1c18d1380f
-fsanitize=fuzzer was being added to LINKER_FLAGS from Lagom/CMakeLists, which we don't want with FuzzilliJs as we want to define the functions it provides ourselves.
47 lines
1.2 KiB
Diff
47 lines
1.2 KiB
Diff
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,
|
|
]
|