Skip to content

Compile error #499

Description

@Wa1nut4

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?

Activity

  1. Liedtke commented on Feb 8, 2025

    @Liedtke
    Collaborator

    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. ↩

  2. diaoqi129 commented on Feb 12, 2025

    @diaoqi129

    i meet the same question when build fuzzilli in swift 5.9

  3. shopifyjohncoulter-code commented on Nov 13, 2025

    @shopifyjohncoulter-code

    the build issue were fixed in Swift 6.2.1, let me check that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions