Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stack overflow detection to SW emulator #1735

Open
clundin25 opened this issue Oct 24, 2024 · 3 comments · May be fixed by #1785
Open

Add stack overflow detection to SW emulator #1735

clundin25 opened this issue Oct 24, 2024 · 3 comments · May be fixed by #1785

Comments

@clundin25
Copy link
Contributor

clundin25 commented Oct 24, 2024

#1722 uncovered a latent stack overflow. We need to add tests / checks / ci to make sure we are not hitting any stack overflows.

@ArthurHeymans
Copy link
Contributor

#1722 uncovered a latent stack overflow. We need to add tests / checks / ci to make sure we are not hitting any stack overflows.

rust-embedded/cortex-m-rt#34 this explains a zero cost abstraction to achieve it

@clundin25
Copy link
Contributor Author

That looks like a good approach (cross-linking the tracking bug #1665).

Adding stack monitoring in the simulator has a few advantages:

  • Doesn't touch any of the prod artifacts.
  • Allows for data collection, so we can monitor for code paths that are close to overflowing.

I think it makes sense to implement both.

@ArthurHeymans
Copy link
Contributor

That looks like a good approach (cross-linking the tracking bug #1665).

Adding stack monitoring in the simulator has a few advantages:

  • Doesn't touch any of the prod artifacts.
  • Allows for data collection, so we can monitor for code paths that are close to overflowing.

I think it makes sense to implement both.

That makes sense.
Also I think hitless update might be impossible to achieve when changing the stack location. Although I think it's a good idea to do that in 2.0 where the rom is not yet finalized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants