Skip to content

Commit

Permalink
Profiles/Serenity: Resolve build errors in file
Browse files Browse the repository at this point in the history
Verified to work with current master commit of SerenityOS/serenity.

Turns out the code prefix/suffix are required due to the way that the
.cpp file of the SerenityOS Fuzzer binary driver is written.
  • Loading branch information
ADKaster authored and carl-smith committed Jan 8, 2024
1 parent 68d6c13 commit 172778a
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Sources/FuzzilliCli/Profiles/Serenity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,33 @@
import Fuzzilli

let serenityProfile = Profile(
processArguments: [""],
processArgs: { randomize in return [""] },
processEnv: [
"UBSAN_OPTIONS":"handle_segv=0 handle_abrt=0",
"ASAN_OPTIONS":"abort_on_error=1"
"UBSAN_OPTIONS": "handle_segv=0 handle_abrt=0",
"ASAN_OPTIONS": "abort_on_error=1",
],
maxExecsBeforeRespawn: 1000,
timeout: 250,
codePrefix: ""
codeSuffix: ""
codePrefix: """
function main() {
""",
codeSuffix: """
}
main();
""",
ecmaVersion: ECMAScriptVersion.es6,

crashTests: ["fuzzilli('FUZZILLI_CRASH', 0)", "fuzzilli('FUZZILLI_CRASH', 1)"],

additionalCodeGenerators: WeightedList<CodeGenerator>([]),
additionalCodeGenerators: [],
additionalProgramTemplates: WeightedList<ProgramTemplate>([]),

disabledCodeGenerators: [],
disabledMutators: [],

additionalBuiltins: [
"gc" : .function([] => .undefined)
]
"gc": .function([] => .undefined)
],

optionalPostProcessor: nil
)

0 comments on commit 172778a

Please sign in to comment.