Skip to content

Max Stack Analysis does not account for functions missing .stack_sizes info #2596

Description

@jamesmunns

The current max-stack code does not account for functions that do not have .stack_sizes metadata provided by LLVM. This includes inline assembly (like system calls), statically linked libraries (like from salty), or compiler-builtins (like memcpy).

I've written a hacky pass to the stack analysis to calculate this: james/enhance-stack.../james/calculate-stack. If this analysis appears to be sufficient enough, we could potentially remove our dependency on the unstable -Z flags required to make rustc/llvm emit the .stack_sizes section.

CC #2588

Metadata

Metadata

Assignees

No one assigned

    Labels

    robustnessFixing this would improve robustness of deployed firmware

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions