fuzzilli
fuzzilli copied to clipboard
Compile error
environment:
Linux kali 6.5.0-kali3-amd64
swift 6.0.3
compile error as follow:
Building for debugging...
/home/kali/Fuzz/fuzzilli/Sources/Fuzzilli/Lifting/WasmLifter.swift:595:55: error: cannot call value of non-function type 'Int'
let numDefinedTablesWithEntries = self.tables.count { instruction in
^
error: fatalError
whether is the swift version too high?
The Array.count with a predicate function was added in 6.0.x[^1], are you sure you compiled with 6.0.3?
(I ran into the same issue when the change landed and updating to 6.0.3 fixed the compile error.)
As a workround you could replace the code in question with:
let numDefinedTablesWithEntries = self.tables.filter { instruction in
!(instruction.op as! WasmDefineTable).definedEntryIndices.isEmpty
}.count
[^1]: Unfortunately the Swift documentation doesn't seem to document this.
i meet the same question when build fuzzilli in swift 5.9
the build issue were fixed in Swift 6.2.1, let me check that.