I have a library and and app using the library, and compiling for AVR target using avr-gcc. It's seem to be overflowing the device so I want to check stack usage. I tried building my library which is pure rust and got:
which makes no sense as the function works with 64-byte numbers, and does a few allocations. I turned to cargo-call-stack and as it doesn't support AVR either (https://github.com/japaric/cargo-call-stack/issues/92), I chose an ARM target to view call-stack output:
so according to cargo-call-stack which uses emit-stack-sizes under the hood, the same function double_assign_mod uses 1424 bytes, which makes more sense.
@Nilstrieb this is not exactly AVR as I'm running RUSTFLAGS="-Z emit-stack-sizes" when building library, which is pure rust, and target shouldn't matter.
I have a library and and app using the library, and compiling for AVR target using
avr-gcc
. It's seem to be overflowing the device so I want to check stack usage. I tried building my library which is pure rust and got:which makes no sense as the function works with 64-byte numbers, and does a few allocations. I turned to
cargo-call-stack
and as it doesn't support AVR either (https://github.com/japaric/cargo-call-stack/issues/92), I chose an ARM target to viewcall-stack
output:so according to
cargo-call-stack
which usesemit-stack-sizes
under the hood, the same functiondouble_assign_mod
uses 1424 bytes, which makes more sense.related:
rustc --version --verbose
:@japaric