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.