stats: fix a bug where empty StatName cannot initialize storage correctly #45348
+13
−2
CI (Envoy) / Mobile/Release validation
skipped
Jun 4, 2026 in 0s
Check was skipped
This check was not triggered in this CI run
Details
Request (pr/45348/main@062a08d)
@wbpcode
062a08d #45348
merge main@686a117
stats: fix a bug where empty StatName cannot initialize storage correctly
Commit Message: stats: fix a bug where empty StatName cannot initialize storage correctly
Additional Description:In the previous implementation, if we use StatName that constructed with default constructor (data_and_size_ be nullptr) to construct StatNameStorage, it will crash Envoy.
This is because
copyToMemBlockmethod of StatName not handle the case where data_and_size_ be nullptr correctly. Now, this PR unified related calling to Encoding's helper methods.Risk Level: low.
Testing: unit.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.
Environment
Request variables
| Key | Value |
|---|---|
| ref | 713ff2c |
| sha | 062a08d |
| pr | 45348 |
| base-sha | 686a117 |
| actor | |
| message | stats: fix a bug where empty StatName cannot initialize storage correctly... |
| started | 1780588273.323446 |
| target-branch | main |
| trusted | false |
Build image
Container image/s (as used in this CI run)
| Key | Value |
|---|---|
| default | docker.io/envoyproxy/envoy-build:v0.1.5 |
| mobile | docker.io/envoyproxy/envoy-build:mobile-v0.1.5 |
Version
Envoy version (as used in this CI run)
| Key | Value |
|---|---|
| major | 1 |
| minor | 39 |
| patch | 0 |
| dev | true |
Loading