Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error #499

Open
Wa1nut4 opened this issue Feb 8, 2025 · 2 comments
Open

Compile error #499

Wa1nut4 opened this issue Feb 8, 2025 · 2 comments

Comments

@Wa1nut4
Copy link

Wa1nut4 commented Feb 8, 2025

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?

@Liedtke
Copy link
Contributor

Liedtke commented Feb 8, 2025

The Array.count with a predicate function was added in 6.0.x1, 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

Footnotes

  1. Unfortunately the Swift documentation doesn't seem to document this.

@diaoqi129
Copy link

i meet the same question when build fuzzilli in swift 5.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants