logger: Create only one Context per process for mobile #38188
CI (Envoy) / Mobile/iOS
succeeded
Jan 25, 2025 in 17m 50s
Mobile/iOS (success)
Check has finished
Details
Check run finished (success ✔️)
The check run can be viewed here:
Mobile/iOS (pr/38188/main@525e6fb)
Check started by
Request (pr/38188/main@525e6fb)
@abeyad 525e6fb
#38188 merge
main@ad2a1c7
logger: Create only one Context per process for mobile
The Logger::Context operates as a stack. When a new one is created, it becomes the active Context. When it gets destroyed, the previous Context is popped to become the activate one.
This can lead to lifetime bugs in Envoy Mobile. If multiple engines are created, the destruction of those engines can cause indeterminate destruction of the Logger::Context objects.
In this commit, the behavior is changed so that the Logger::Context initialization in mobile is done one time only, outside of StrippedMainBase. And StrippedMainBase will only initialize a Logger::Context if one is not already active.
Environment
Request variables
Key | Value |
---|---|
ref | b97b5e4 |
sha | 525e6fb |
pr | 38188 |
base-sha | ad2a1c7 |
actor | @abeyad |
message | logger: Create only one Context per process for mobile... |
started | 1737766269.490287 |
target-branch | main |
trusted | false |
Build image
Container image/s (as used in this CI run)
Key | Value |
---|---|
default | envoyproxy/envoy-build-ubuntu:d2be0c198feda0c607fa33209da01bf737ef373f |
mobile | envoyproxy/envoy-build-ubuntu:mobile-d2be0c198feda0c607fa33209da01bf737ef373f |
Version
Envoy version (as used in this CI run)
Key | Value |
---|---|
major | 1 |
minor | 34 |
patch | 0 |
dev | true |
Loading