Bug in QuicServerInfoMap iteration |
||||
Issue description
quic_stream_factory.cc Line 1715
for (const auto& key_value :
http_server_properties_->quic_server_info_map()) {
const QuicServerId& server_id = key_value.first;
server_info.reset(quic_server_info_factory_->GetForServer(server_id));
if (server_info->WaitForDataReady(callback) == OK) {
DVLOG(1) << "Initialized server config for: " << server_id.ToString();
InitializeCachedStateInCryptoConfig(server_id, server_info, nullptr);
}
}
This loop will run thousands of iterations because of base::MRUCache doesn't support auto syntax.
Please use QuicServerInfoMap::const_reverse_iterator to iterate the map.
,
Apr 6 2016
I meant right away.
,
Apr 6 2016
This could be a problem for other MRU Caches in HttpServerProperties*.* code which use auto syntax on Android (??).
,
Apr 6 2016
MRUCache supports auto syntax. There is a bug in my code. While traversing the MRUCache, we call WaitForDataReady which touches the MRUCache.
,
Apr 6 2016
Ah, I see. That makes sense. Thanks, Raman!
,
Apr 6 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ee679d531c757121a83ee0f919b7af9a30e86ee7 commit ee679d531c757121a83ee0f919b7af9a30e86ee7 Author: rtenneti <rtenneti@chromium.org> Date: Wed Apr 06 17:01:13 2016 QUIC - Android - Fix the bug in QuicServerInfoMap iteration when server configs are loaded from properties file. Iteration can go into an infinite loop if there is more than one entry. During iteration, Get() method of MRUCache was being called which would modify the map that is being iterated. BUG= 600864 R=rch@chromium.org Review URL: https://codereview.chromium.org/1866613002 Cr-Commit-Position: refs/heads/master@{#385484} [modify] https://crrev.com/ee679d531c757121a83ee0f919b7af9a30e86ee7/net/quic/quic_stream_factory.cc [modify] https://crrev.com/ee679d531c757121a83ee0f919b7af9a30e86ee7/net/quic/quic_stream_factory_test.cc
,
Apr 7 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by rtenneti@chromium.org
, Apr 6 2016