0xPolygonMiden / compiler

Compiler from MidenIR to Miden Assembly
MIT License
65 stars 22 forks source link

Failing to build a new cargo-miden project with `cargo miden build` (`invalid stack index` error) #323

Closed greenhat closed 2 months ago

greenhat commented 2 months ago

cargo-miden version: 0.0.6

Error:

thread 'main' panicked at /Users/dzadorozhnyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/midenc-codegen-masm-0.0.6/src/codegen/emitter.rs:1068:24:
invalid stack index: only the first 16 elements on the stack are directly accessible, got 16

Steps to reproduce:

greenhat commented 2 months ago

our https://github.com/0xPolygonMiden/compiler/blob/dfc7f841c0a9feb1e4ffee5929842db77584755f/tools/cargo-miden/tests/build.rs#L16-L61 should've caught it.

greenhat commented 2 months ago

The reason for the error is the missing --release option. I mean, we tested only the release build and not the dev profile.