commit | bba9a18e81914bf4bd106e03c167058afb1c6609 | [log] [tgz] |
---|---|---|
author | QUICHE team <quiche-dev@google.com> | Fri Jul 23 17:40:17 2021 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Jul 23 17:40:52 2021 -0700 |
tree | 0e5f9d181571277f9f5808781bebfaaa7bdd6f3a | |
parent | 2a6291128e31550c73622cf3ac2e00da51c64069 [diff] |
Initialize SimpleRandom::buffer_offset_ in quic_test_utils A few QUIC tests seemed like they might have been failing on Chromium's Win 7 bots because quic_test_utils's SimpleRandom::RandUint64 was being accessed out of bounds. [0] After the discussion in crbug.com/1228245#c23, this seems like a red herring: the initial stack trace was corrupted (the waterfall bots in question were running with a low symbol_level). The issue seems like it was actually in quic::DefaultRandom, not quic::test::SimpleRandom. But, in any event, it seems like a safety improvement to initialize the buffer offset in SimpleRandom: this CL goes ahead and does so, even if it might not be necessary for addressing the crashes in question. [0] https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8840889728099773792/+/u/net_unittests/Deterministic_failure:_QuicTimeWaitListManagerTest.SendStatelessResetInResponseToShortHeaders__status_CRASH_ PiperOrigin-RevId: 386564749
diff --git a/quic/test_tools/quic_test_utils.h b/quic/test_tools/quic_test_utils.h index e10d9c1..17aa920 100644 --- a/quic/test_tools/quic_test_utils.h +++ b/quic/test_tools/quic_test_utils.h
@@ -282,7 +282,7 @@ private: uint8_t buffer_[4096]; - size_t buffer_offset_; + size_t buffer_offset_ = 0; uint8_t key_[32]; void FillBuffer();