Ensure SocketOptionImpl.value_.data() is pointer-size-aligned.#38707
Merged
RyanTheOptimist merged 1 commit intoenvoyproxy:mainfrom Mar 12, 2025
Merged
Ensure SocketOptionImpl.value_.data() is pointer-size-aligned.#38707RyanTheOptimist merged 1 commit intoenvoyproxy:mainfrom
RyanTheOptimist merged 1 commit intoenvoyproxy:mainfrom
Conversation
pointer-size-aligned, which is expected by the ASSERT in SocketOptionImpl's constructor. Signed-off-by: Bin Wu <[email protected]>
Contributor
Author
|
/assign @RyanTheOptimist |
Contributor
Author
|
/retest |
RyanTheOptimist
approved these changes
Mar 12, 2025
Contributor
RyanTheOptimist
left a comment
There was a problem hiding this comment.
Wow, this is such a great CL. Thanks for doing this!
| const std::vector<uint8_t> value_; | ||
| // The vector's data() is used by the setsockopt syscall, which needs to be int-size-aligned on | ||
| // some platforms, the AlignedAllocator here makes it pointer-size-aligned, which satisfies the | ||
| // requirement, although it can be slightly over-aligned. |
Contributor
There was a problem hiding this comment.
Excellent comment!
Contributor
Contributor
|
@wu-bin which platforms were the ASAN tests failing on? Our Android NDK version (same version YT is using) doesn't support Otherwise, Envoy Mobile won't compile unfortunately on Android.. |
Contributor
abeyad
added a commit
to abeyad/envoy
that referenced
this pull request
Mar 13, 2025
There have been several instances that changes, particularily to source/* directories, have introduced C++ features not supported by the Android NDK or iOS XCode version for Envoy Mobile. Without triggering the mobile Android and iOS jobs on those changes, we don't catch them until after the fact. The latest example is the std::aligned_alloc PR: envoyproxy#38707. Which introduced build errors on Android that CI didn't catch at the time of the PR and only in a subsequent PR that triggered mobile CI: https://github.com/envoyproxy/envoy/actions/runs/13818727995/job/38658598098. This change causes any changes to `source/common/` to trigger Android and iOS CI. This is a start in allowing us to catch such changes in the PR making the changes. Signed-off-by: Ali Beyad <[email protected]>
abeyad
added a commit
to abeyad/envoy
that referenced
this pull request
Mar 13, 2025
envoyproxy#38707 enabled a new aligned allocator using `std::aligned_alloc`. However, `std::aligned_alloc` is not available on the Android NDK we are using for Envoy Mobile, thereby causing Envoy Mobile Android CI to fail. This PR temporarily disables the aligned allocator on Android until a more permanent solution is implemented. Signed-off-by: Ali Beyad <[email protected]>
abeyad
added a commit
to abeyad/envoy
that referenced
this pull request
Mar 13, 2025
envoyproxy#38707 enabled a new aligned allocator using `std::aligned_alloc`. However, `std::aligned_alloc` is not available on the Android NDK we are using for Envoy Mobile, thereby causing Envoy Mobile Android CI to fail. This PR temporarily disables the aligned allocator on Android until a more permanent solution is implemented. Signed-off-by: Ali Beyad <[email protected]>
abeyad
added a commit
to abeyad/envoy
that referenced
this pull request
Mar 13, 2025
envoyproxy#38707 enabled a new aligned allocator using `std::aligned_alloc`. However, `std::aligned_alloc` is not available on the Android NDK we are using for Envoy Mobile, thereby causing Envoy Mobile Android CI to fail. This PR temporarily disables the aligned allocator on Android until a more permanent solution is implemented. Signed-off-by: Ali Beyad <[email protected]>
Contributor
Author
|
Thanks everyone for the comments! I'm able to reproduce it, I'll send a fix to use posix_memalign on the older Android versions. Edit: I just sent #38735 to use posix_memalign. |
phlax
pushed a commit
that referenced
this pull request
Mar 14, 2025
…38733) There have been several instances that changes, particularily to source/* directories, have introduced C++ features not supported by the Android NDK or iOS XCode version for Envoy Mobile. Without triggering the mobile Android and iOS jobs on those changes, we don't catch them until after the fact. The latest example is the std::aligned_alloc PR: #38707. Which introduced build errors on Android that CI didn't catch at the time of the PR and only in a subsequent PR that triggered mobile CI: https://github.com/envoyproxy/envoy/actions/runs/13818727995/job/38658598098. This change causes any changes to `source/common/` to trigger Android and iOS CI. This is a start in allowing us to catch such changes in the PR making the changes. Signed-off-by: Ali Beyad <[email protected]>
jewertow
pushed a commit
to jewertow/envoy
that referenced
this pull request
Apr 2, 2025
…proxy#38707) This should fix envoyproxy#7968 for good. Commit Message: Ensure SocketOptionImpl.value_.data() is pointer-size-aligned. Additional Description: Risk Level: None Testing: Docs Changes: Release Notes: Platform Specific Features: Signed-off-by: Bin Wu <[email protected]>
jewertow
pushed a commit
to jewertow/envoy
that referenced
this pull request
Apr 2, 2025
…nvoyproxy#38733) There have been several instances that changes, particularily to source/* directories, have introduced C++ features not supported by the Android NDK or iOS XCode version for Envoy Mobile. Without triggering the mobile Android and iOS jobs on those changes, we don't catch them until after the fact. The latest example is the std::aligned_alloc PR: envoyproxy#38707. Which introduced build errors on Android that CI didn't catch at the time of the PR and only in a subsequent PR that triggered mobile CI: https://github.com/envoyproxy/envoy/actions/runs/13818727995/job/38658598098. This change causes any changes to `source/common/` to trigger Android and iOS CI. This is a start in allowing us to catch such changes in the PR making the changes. Signed-off-by: Ali Beyad <[email protected]>
agrawroh
pushed a commit
to agrawroh/envoy
that referenced
this pull request
Apr 9, 2025
…proxy#38707) This should fix envoyproxy#7968 for good. Commit Message: Ensure SocketOptionImpl.value_.data() is pointer-size-aligned. Additional Description: Risk Level: None Testing: Docs Changes: Release Notes: Platform Specific Features: Signed-off-by: Bin Wu <[email protected]>
agrawroh
pushed a commit
to agrawroh/envoy
that referenced
this pull request
Apr 9, 2025
…nvoyproxy#38733) There have been several instances that changes, particularily to source/* directories, have introduced C++ features not supported by the Android NDK or iOS XCode version for Envoy Mobile. Without triggering the mobile Android and iOS jobs on those changes, we don't catch them until after the fact. The latest example is the std::aligned_alloc PR: envoyproxy#38707. Which introduced build errors on Android that CI didn't catch at the time of the PR and only in a subsequent PR that triggered mobile CI: https://github.com/envoyproxy/envoy/actions/runs/13818727995/job/38658598098. This change causes any changes to `source/common/` to trigger Android and iOS CI. This is a start in allowing us to catch such changes in the PR making the changes. Signed-off-by: Ali Beyad <[email protected]>
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.
This should fix #7968 for good.
Commit Message: Ensure SocketOptionImpl.value_.data() is pointer-size-aligned.
Additional Description:
Risk Level: None
Testing:
Docs Changes:
Release Notes:
Platform Specific Features: