build/test: Fix msan use-of-unitialized-value in transport_sockets/tls/context_impl.cc #7697
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.
Signed-off-by: Ashley Hedberg [email protected]
Description: The sin_port/sin6_port fields were not initialized, causing msan to warn on use-of-uninitialized-value in ssl_socket_test:
[ RUN ] IpVersions/SslSocketTest.Ipv4San/IPv6
==5456==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x55cfb4ae6a9b in Envoy::Network::Address::Ipv4Instance::Ipv4Instance(sockaddr_in const*) source/common/network/address_impl.cc:178:24
#1 0x55cfaf715886 in Envoy::Extensions::TransportSockets::Tls::ContextImpl::verifySubjectAltName(x509_st*, std::__msan::vector<std::__msan::basic_string<char, std::__msan::char_traits, std::__msan::allocator >, std::__msan::allocator<std::__msan::basic_string<char, std::__msan::char_traits, std::__msan::allocator > > > const&) source/extensions/transport_sockets/tls/context_impl.cc:523:40
This was detected during google's import.
Risk Level: none (test-only fix)
Testing: internal testing to confirm that this change fixes the msan warnings, plus bazel test test/extensions/transport_sockets/...
Docs Changes: n/a
Release Notes: n/a