Skip to content

cortex-m-rt: assert in linker script that stack_start is 8-byte aligned. #464

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 11, 2023

Conversation

Dirbaio
Copy link
Member

@Dirbaio Dirbaio commented Feb 11, 2023

If the user sets RAM length to something that's not multiple of 8, the stack won't be 8-byte aligned. This'll trigger the same horrible symptoms as #463 .

This PR adds an assert to the linker script that enforces alignment.

@Dirbaio Dirbaio requested a review from a team as a code owner February 11, 2023 02:06
@Dirbaio Dirbaio force-pushed the rt-check-stack-align branch from bca7583 to 8ca79bf Compare February 11, 2023 02:36
@Dirbaio Dirbaio force-pushed the rt-check-stack-align branch from 8ca79bf to 34b14d8 Compare February 11, 2023 02:43
Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

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

Thanks!

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 11, 2023

@bors bors bot merged commit 2bdd95f into rust-embedded:master Feb 11, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants