diff options
author | Abseil Team <absl-team@google.com> | 2023-02-23 13:05:39 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-02-23 13:06:27 -0800 |
commit | 4825ef40953aeb4a71e3625203b760381da6b0d7 (patch) | |
tree | d8931476e759cd07d9b22ebad887700161b7e725 /absl/base | |
parent | 6d16237574fed8538a4864954a5e2b5a098f32f2 (diff) |
Initialize ScopedMockLog.is_triggered_ with false.
In C++20, this happens by default, but in C++17, it's left uninitialized if no logs are sent and StartCapturingLogs is never called. The destructor then makes an attempt to access it, which is both unsafe and not very useful while it is uninitialized.
Also add a test that expects the appropriate CHECK fail when StartCapturingLogs is not called.
PiperOrigin-RevId: 511865440
Change-Id: Ie23ff3f901e926761d5f487e10d33c21c3bd43d3
Diffstat (limited to 'absl/base')
0 files changed, 0 insertions, 0 deletions