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([]), + + additionalProgramTemplates: WeightedList([]), + + 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, ]