Description
The Sonatina EVM backend panics during code generation with:
thread 'main' panicked at crates/codegen/src/isa/evm/mod.rs:3498:32:
missing stack object location for obj 21
Reproduction
The rosetta-fe poseidon example triggers this:
cd rosetta-fe/examples/poseidon/fe
fe build
The Fe source uses a custom Fp struct with Add/Mul trait implementations that call addmod/mulmod, combined with array indexing and loops. The combination of operator overloading + array manipulation seems to produce IR that the stack allocator can't handle.
Backtrace
sonatina_codegen::isa::evm::FinalAlloc::rewrite_actions
<sonatina_codegen::isa::evm::FinalAlloc as sonatina_codegen::stackalloc::Allocator>::read
<sonatina_codegen::isa::evm::EvmBackend as sonatina_codegen::machinst::lower::LowerBackend>::lower
sonatina_codegen::machinst::lower::Lower<Op>::lower
sonatina_codegen::isa::evm::EvmBackend::lower_prepared_function
Environment
Description
The Sonatina EVM backend panics during code generation with:
Reproduction
The rosetta-fe poseidon example triggers this:
The Fe source uses a custom
Fpstruct withAdd/Multrait implementations that calladdmod/mulmod, combined with array indexing and loops. The combination of operator overloading + array manipulation seems to produce IR that the stack allocator can't handle.Backtrace
Environment