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 missing stack check. #224

Merged
merged 1 commit into from
May 17, 2024
Merged

Add missing stack check. #224

merged 1 commit into from
May 17, 2024

Conversation

davidchisnall
Copy link
Collaborator

The ABI has included space for the required stack space from the start, but we only recently started putting anything sensible there. It turns out that the switcher was missing this check.

This introduces a new errno code to let the caller differentiate between a call that wasn't allowed to proceed and one that crashed. We may want to use this code for other stack badness.

@davidchisnall davidchisnall force-pushed the stack-check branch 2 times, most recently from b864560 to a675514 Compare May 16, 2024 16:40
Copy link

@nwf nwf left a comment

Choose a reason for hiding this comment

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

LGTM if it passes testing (not on work machine, so that doesn't count as a review, bah)

sdk/core/switcher/entry.S Outdated Show resolved Hide resolved
tests/test-runner.cc Outdated Show resolved Hide resolved
tests/stack-test.cc Show resolved Hide resolved
The ABI has included space for the required stack space from the start,
but we only recently started putting anything sensible there.  It turns
out that the switcher was missing this check.

This introduces a new errno code to let the caller differentiate between
a call that wasn't allowed to proceed and one that crashed.  We may want
to use this code for other stack badness.
@davidchisnall davidchisnall enabled auto-merge (rebase) May 17, 2024 11:11
@davidchisnall davidchisnall merged commit 3e0eaf0 into main May 17, 2024
7 checks passed
@davidchisnall davidchisnall deleted the stack-check branch May 17, 2024 11:35
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.

None yet

3 participants