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

Fix pgm_read_word for 64-bit host builds #2844

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Jun 27, 2024

Sanitizer caught issue with pgm_read_dword on 64-bit build, defined as unsigned long instead of uint32_t.

Suppress sanitizer alignment warnings for some FlashString methods where (64-bit) pointers are aligned to 32-bit boundaries. We need everything (including pointers) to be 32-bit aligned so this isn't a bug. (It's an optimisation thing.)

mikee47 added 2 commits June 27, 2024 16:12
Santizer caught invalid memory read because `unsigned long` is 64 bits.
We need everything - including pointers - to be 32-bit aligned so this isn't a bug.
@mikee47 mikee47 changed the title Fix host pgm_read_word and suppress sanitizer alignment warnings Fix pgm_read_word for 64-bit host builds Jun 27, 2024
@mikee47 mikee47 changed the title Fix pgm_read_word for 64-bit host builds [WIP] Fix pgm_read_word for 64-bit host builds Jun 27, 2024
@slaff slaff added this to the 5.2.0 milestone Jun 27, 2024
@mikee47 mikee47 changed the title [WIP] Fix pgm_read_word for 64-bit host builds Fix pgm_read_word for 64-bit host builds Jun 27, 2024
@slaff slaff merged commit 6570fd3 into SmingHub:develop Jun 28, 2024
48 checks passed
@mikee47 mikee47 deleted the fix/host-pgmspace64 branch July 2, 2024 15:03
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.

2 participants