build(deps): bump abseil-cpp to latest version#24386
Conversation
This also allows us to remove the mobile override and its patch because the new version of abseil-cpp pulls in google/cctz#237. Fixes envoyproxy/envoy-mobile#136. Signed-off-by: JP Simard <jp@jpsim.com>
c1f0745 to
c3b344e
Compare
|
CC @envoyproxy/mobile-maintainers: FYI only for changes made to |
|
/assign @alyssawilk |
Signed-off-by: JP Simard <jp@jpsim.com>
CI was not willing :( Had to |
|
asan is also not willing: https://github.com/envoyproxy/envoy/actions/runs/3631831474/jobs/6127137584 |
|
/retest |
|
Retrying Azure Pipelines: |
|
I was able to bisect the asan failure to this commit: abseil/abseil-cpp@91b7cd6 |
…-cpp-to-latest-version * origin/main: (23 commits) Reduce Route memory utilization by avoiding RuntimeData instances when not needed (#24327) build: fix compile error for mac (#24429) postgres: support for upstream SSL (#23990) iOS: split `EnvoyEngine.h` into multiple header files (#24397) mobile: check for pending exceptions after JNI call (#24361) Remove uneccessary `this->` from mobile engine builder (#24389) Add setRequestDecoder to ResponseEncoder interface (#24368) downstream: refactoring code to remove listener hard deps (#24394) lb api: moving load balancing policy specific configuration to extension configuration (#23967) ci: Skip docker/examples verification for docs or mobile only changes (#24417) ci: run mobile GitHub Actions on every PR (#24407) mobile: remove `bump_lyft_support_rotation.sh` script (#24404) Add file size to DirectoryEntry (#24176) bazel: update to 6.0.0rc4 (#24235) bazel: update rules_rust (#24409) Ecds config dump recommit (#24384) bazel: add another config_setting incompatible flag (#24270) listeners: moving listeners to extension directory (#24248) mobile: build Swift with whole module optimization (#24396) ci: update `actions/setup-java` from v1 to v3.8 (#24393) ... Signed-off-by: JP Simard <jp@jpsim.com>
I'm hoping that abseil/abseil-cpp@5736d76 fixes the asan failure we're seeing. Signed-off-by: JP Simard <jp@jpsim.com>
|
I filed abseil/abseil-cpp#1339 to report the undefined behavior error reported in sanitizer CI jobs. |
envoy/source/common/http/status.cc Lines 43 to 65 in 8486a0c The bug is in the reinterpret_cast in this code. The reinterpret_cast assumes the data is pointer-aligned. Instead the data needs to be read/written using memcpy or something endian-neutral if it is sent over the wire. |
Correct me if I'm wrong, but wouldn't that incur the cost of a copy where the current code doesn't? |
A copy is already being made in |
Signed-off-by: JP Simard <jp@jpsim.com>
Thanks for the suggestion. I'm not trying to play games, just trying to do things correctly here without unreasonably regressing behavior or performance here. I've made an attempt to switch to |
Signed-off-by: JP Simard <jp@jpsim.com>
|
/wait on CI |
|
@yanavlasov could you please take a look? |
source/common/http/status.cc
Outdated
| const size_t payload_size = sizeof(payload); | ||
| char* buffer = new char[payload_size]; | ||
| safeMemcpyUnsafeDst(buffer, &payload); | ||
| absl::Cord cord(absl::string_view(buffer, payload_size)); |
There was a problem hiding this comment.
The changes to this function do not solve any problem. I think the only change needed is something like this:
template <typename T> void storePayload(absl::Status& status, const T& payload) {
const T* allocated = new T(payload);
absl::Cord cord = absl::MakeCordFromExternal(absl::string_view(&allocated, sizeof(allocated)), [allocated]() { delete allocated; });
status.SetPayload(EnvoyPayloadUrl, std::move(cord));
}
Then getPayload should not have to change at all since the object will already be correctly aligned.
There was a problem hiding this comment.
Thanks for the suggestion. Seems like absl::string_view() expects a char * as its first argument, but here we have a T*.
source/common/http/status.cc:46:48: error: no matching constructor for initialization of 'absl::string_view'
absl::Cord cord = absl::MakeCordFromExternal(absl::string_view(&allocated, sizeof(allocated)), [allocated]() { delete allocated; });
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There was a problem hiding this comment.
It is safe to cast to const char *.
There was a problem hiding this comment.
Looks like the tests pass with the latest changes, including with the address and undefined behavior sanitizers.
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
| const T* allocated = new T(payload); | ||
| const absl::string_view sv = | ||
| absl::string_view(reinterpret_cast<const char*>(allocated), sizeof(allocated)); | ||
| absl::Cord cord = absl::MakeCordFromExternal(sv, [allocated]() { delete allocated; }); |
There was a problem hiding this comment.
trusting proto folks and our tests for correctness here :-P
…-tools * origin/main: (59 commits) Make IsOkAndHolds matcher work with submatchers (#24498) ios: fix platform key value store (#24532) make ClusterInfo::traffic_stats_ a unique_ptr, so that later we can lazy-init it later. (#24406) quic: splitting into client and server (#24513) fixing coverage (#24529) ci: Add `examplesOnly` condition (#24465) ci: sonatype_nexus_upload.py: remove unused format argument (#24471) deps: Bump `build_bazel_rules_apple` -> 1.1.3 (#24527) deps: Bump `com_github_nghttp2_nghttp2` -> 1.51.0 (#24525) deps: Bump `rules_license` -> 0.0.4 (#24523) build(deps): bump sphinxcontrib-httpdomain from 1.8.0 to 1.8.1 in /mobile/docs (#24126) build(deps): bump github/codeql-action from 2.1.35 to 2.1.36 (#24473) build(deps): bump openpolicyagent/opa from 0.47.2-istio to 0.47.3-istio in /examples/ext_authz (#24514) build(deps): bump node from `80844b6` to `2770c78` in /examples/ext_authz/auth/http-service (#24515) build(deps): bump abseil-cpp to latest version (#24386) xDS: add xDS config tracker extension point (#23485) kafka: add shared consumer manager (#24494) coverage: Improve test coverage (#24355) deps: Bump `rules_python` -> 0.16.1 (#24344) ci: revert disable running the Objective-C integration app (#24478)" (#24496) ... Signed-off-by: JP Simard <jp@jpsim.com>

This also allows us to remove the mobile override and its patch because the new version of abseil-cpp pulls in google/cctz#237.
Fixes envoyproxy/envoy-mobile#136.
Commit Message:
Additional Description:
Risk Level: Moderate, bumping a core dependency
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
Fixes: envoyproxy/envoy-mobile#136