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 #1785

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

clundin25
Copy link
Contributor

@clundin25 clundin25 commented Nov 12, 2024

Added stack monitoring and overflow detection to the SW emulator

If a stack overflow is detected, the emulator will panic and cause test failure.

This resolves #1735

fn check_stack(&mut self, val: RvData) {
if let Some(stack_info) = &mut self.stack_info {
if stack_info.check_overflow(val) {
panic!(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, this could be a print statement and the panic ocurring in Cpu::drop.

This would allow the max stack overflow to be observed.

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 this pull request may close these issues.

Add stack overflow detection to SW emulator
2 participants