bn_nist: fix strict aliasing problem (1.1.1 backport)#18948
Closed
mattcaswell wants to merge 1 commit intoopenssl:OpenSSL_1_1_1-stablefrom
Closed
bn_nist: fix strict aliasing problem (1.1.1 backport)#18948mattcaswell wants to merge 1 commit intoopenssl:OpenSSL_1_1_1-stablefrom
mattcaswell wants to merge 1 commit intoopenssl:OpenSSL_1_1_1-stablefrom
Conversation
As of clang-14 the strict aliasing is causing code to magically disappear. By explicitly inlining the code, the aliasing problem evaporates. Fixes openssl#18225 Backport of openssl#18258 to 1.1.1.
330bd07 to
318ab8e
Compare
This was referenced Aug 3, 2022
hlandau
suggested changes
Aug 4, 2022
| int ii; \ | ||
| const BN_ULONG *src = src_in; \ | ||
| \ | ||
| for (ii = 0; ii < top; ii++) \ |
Member
There was a problem hiding this comment.
I suppose if dst is in parens src_in, top and max should be as well.
Member
Author
There was a problem hiding this comment.
Hmm....yes. But this is a backport of code that is already merged to master/3.0. I'm not sure we should have a different version of the code in 1.1.1.
Member
There was a problem hiding this comment.
Up to you I guess. It's safe in all the places it's currently used, so...
hlandau
approved these changes
Aug 4, 2022
| int ii; \ | ||
| const BN_ULONG *src = src_in; \ | ||
| \ | ||
| for (ii = 0; ii < top; ii++) \ |
Member
There was a problem hiding this comment.
Up to you I guess. It's safe in all the places it's currently used, so...
paulidale
approved these changes
Aug 15, 2022
t8m
approved these changes
Aug 15, 2022
Collaborator
|
This pull request is ready to merge |
Member
|
Merged to 1.1.1. Thank you. |
openssl-machine
pushed a commit
that referenced
this pull request
Aug 17, 2022
As of clang-14 the strict aliasing is causing code to magically disappear. By explicitly inlining the code, the aliasing problem evaporates. Fixes #18225 Backport of #18258 to 1.1.1. Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #18948)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Sep 9, 2022
As of clang-14 the strict aliasing is causing code to magically disappear. By explicitly inlining the code, the aliasing problem evaporates. Fixes openssl#18225 Backport of openssl#18258 to 1.1.1. Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#18948) (cherry picked from commit 6246649)
bernd-edlinger
pushed a commit
to bernd-edlinger/openssl
that referenced
this pull request
Sep 9, 2022
As of clang-14 the strict aliasing is causing code to magically disappear. By explicitly inlining the code, the aliasing problem evaporates. Fixes openssl#18225 Backport of openssl#18258 to 1.1.1. Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#18948) (cherry picked from commit 6246649)
jeremy
added a commit
to basecamp/homebrew-dev
that referenced
this pull request
Mar 21, 2024
jeremy
added a commit
to basecamp/homebrew-dev
that referenced
this pull request
Mar 21, 2024
a-kromm-rogii
pushed a commit
to a-kromm-rogii/openssl
that referenced
this pull request
Mar 14, 2025
As of clang-14 the strict aliasing is causing code to magically disappear. By explicitly inlining the code, the aliasing problem evaporates. Fixes openssl#18225 Backport of openssl#18258 to 1.1.1. Reviewed-by: Hugo Landau <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#18948)
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.
As of clang-14 the strict aliasing is causing code to magically disappear.
By explicitly inlining the code, the aliasing problem evaporates.
Fixes #18225
Backport of #18258 to 1.1.1.