I'm looking for tips on how to figure out some related things:
- Why is a certain function allocating an unreasonable amount of stack space? E.g. where do these 10984 bytes come from:
0x00005555557163b3 <+3>: mov $0x2ae8,%eax
=> 0x00005555557163b8 <+8>: call 0x555555f8e6b9 <__rust_probestack>
0x00005555557163bd <+13>: sub %rax,%rsp
- Can the compiler print the sizes of types as it goes? Clippy warned me about an enum with a big variant, and it was indeed useful, but it would be nice to be able to find other footguns early.
By hand, I printed the sizes of all the local variables and the result types in my function above, but they only use 788 bytes. So I wonder what I am missing.