Merged
Conversation
Long story: * This test was introduced * `ci/script.sh` did not correctly check for failures, [SC2251] * Thanks rust-embedded#404 for the tip! * The FLASH size was increased, and the test incorrectly passed, but nobody noticed. * I modified the test in rust-embedded#505 which made it fail again, but for the wrong reason. `ptr::read_volatile(ptr::addr_of!(RODATA))` reads the entire array, which is not equivalent to the original code `ptr::read_volatile(&RODATA as *const u8)` which read a single element of the array. * The test now failed, but the stack related overflow takes rustc a LONG time to compile, and pushed our CI times to >30m. These changes fix ci/scripts.sh to exit with a non-zero code if data_overflow is passing, and makes data_overflow fail to compile for the original reason, updating RODATA to reflect the increased FLASH size. [SC2251]: https://www.shellcheck.net/wiki/SC2251
adamgreig
approved these changes
Jun 30, 2024
Member
adamgreig
left a comment
There was a problem hiding this comment.
thanks for figuring this one out!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Long story:
ci/script.shdid not correctly check for failures, SC2251data_overflow.rsexample/test is failing #404 for the tip!ptr::read_volatile(ptr::addr_of!(RODATA))reads the entire array, which is not equivalent to the original codeptr::read_volatile(&RODATA as *const u8)which read a single element of the array.These changes fix ci/scripts.sh to exit with a non-zero code if data_overflow is passing, and makes data_overflow fail to compile for the original reason, updating RODATA to reflect the increased FLASH size.