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

Remove 'packed' attribute where possible #279

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

kevsecurity
Copy link
Contributor

Applying 'packed' attribute to structs causes clang to write to the
members byte-by-byte, as offsets may not be aligned. This is bad for
performance, instruction count and complexity, so don't apply this
attribute to structs where members are correctly aligned already
(e.g. by padding, layout).

Signed-off-by: Kevin Sheldrake [email protected]

Applying 'packed' attribute to structs causes clang to write to the
members byte-by-byte, as offsets may not be aligned. This is bad for
performance, instruction count and complexity, so don't apply this
attribute to structs where members are correctly aligned already
(e.g. by padding, layout).

Signed-off-by: Kevin Sheldrake <[email protected]>
@kevsecurity kevsecurity requested a review from a team as a code owner August 2, 2022 15:18
@kevsecurity kevsecurity requested a review from sharlns August 2, 2022 15:18
@kevsecurity kevsecurity marked this pull request as draft August 2, 2022 16:04
@kevsecurity kevsecurity marked this pull request as ready for review August 2, 2022 16:48
@jrfastab jrfastab merged commit 382c0cc into main Aug 2, 2022
@jrfastab jrfastab deleted the pr/kevsecurity/unpackStructs branch August 2, 2022 16:58
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