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

[nrf fromlist] debug: mipi_stp_decoder: Avoid potential 64bit unalign… #2049

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

nordic-krch
Copy link
Contributor

…ed access

Decoder was casting uint8_t pointers to uint64_t pointers which could result in double word instruction which does not support unaligned access on Cortex-M. Issue was revealed when -O3 optimization was used instead of -Os. In size optimized version, compiler was using word load and store instructions which support unaligned access and issue was not visible.

Upstream PR: zephyrproject-rtos/zephyr#79009

…ed access

Decoder was casting uint8_t pointers to uint64_t pointers which could
result in double word instruction which does not support unaligned
access on Cortex-M. Issue was revealed when -O3 optimization was
used instead of -Os. In size optimized version, compiler was
using word load and store instructions which support unaligned
access and issue was not visible.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit ddf753c)
@nordic-krch nordic-krch force-pushed the ncs/stp_dec_unaligned_fix branch from dab52e7 to c21e8ad Compare October 9, 2024 14:23
@kapi-no kapi-no added this to the ncs-2.8.0 milestone Oct 9, 2024
@rlubos rlubos merged commit 9a51d12 into nrfconnect:main Oct 16, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants