8000 dummy/dummy.c: Fix unaligned access in dummy_get_level() by df7cb · Pull Request #497 · Hamlib/Hamlib · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dummy/dummy.c: Fix unaligned access in dummy_get_level() #497

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

Merged
merged 1 commit into from
Jan 8, 2021

Conversation

df7cb
Copy link
Contributor
@df7cb df7cb commented Jan 8, 2021

This fixes an unaligned access in dummy/dummy.c in the function
dummy_get_level() which resulted in crashes (Bus Error) on systems
with stricter alignment requirements such as SPARC.

On x86_64 (and any other architecture with less strict alignment
requirements), the compiler automatically optimizes the memcpy()
out if necessary such that there are no performance issues.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=950950

This fixes an unaligned access in dummy/dummy.c in the function
dummy_get_level() which resulted in crashes (Bus Error) on systems
with stricter alignment requirements such as SPARC.

On x86_64 (and any other architecture with less strict alignment
requirements), the compiler automatically optimizes the memcpy()
out if necessary such that there are no performance issues.
@mdblack98 mdblack98 closed this Jan 8, 2021
@mdblack98 mdblack98 reopened this Jan 8, 2021
@mdblack98 mdblack98 merged commit 6a52370 into Hamlib:master Jan 8, 2021
@df7cb df7cb deleted the unaligned_access branch February 3, 2021 22:13
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
0