Skip to content

compiler.add_source() panics with "index out of bounds" in cranelift-entity #439

@gowtham-cyber-max

Description

@gowtham-cyber-max

I'm experiencing a panic when calling compiler.add_source() in the YARA-X Rust bindings. The error occurs in the Cranelift compilation backend, not in my application code.

The panic message is:

thread '' panicked at C:\Users[username].cargo\registry\src\index.crates.io-1949cf8c6b5b557f\cranelift-entity-0.121.2\src\list.rs:577:26: index out of bounds: the len is 0 but the index is 4
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

This happens when I try to compile a 200 MB .yar file. It may be related to a memory issue, as the process consumes around 7 GB of RAM.

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