You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fixes two different issues:
1) Previously there was no locking around log sink replacement,
so it was possibles for a log sink to get removed by one
thread while getting written to by another thread.
2) Even with locking, the base class destructor pattern would
do the swap after the derived class was destroyed, leading to
undefined behavior.
This was easy to reproduce in cx_limit_integration_test but is
an issue anywhere the log expectations are used, or previously in the death test
stderr workaround (EXPECT_DEATH_LOG_TO_STDERR) for coverage which has
been removed because coverage no longer logs to a file and instead logs to stderr
like the rest of the tests.
Fixesenvoyproxy#11841
Risk Level: Medium, code is a bit scary, though only really in tests
Testing: Existing tests
Docs Changes: N/A
Release Notes: N/A
Signed-off-by: Matt Klein <[email protected]>
0 commit comments