New issue
Advanced search Search tips

Issue 758889 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Uninitialised members in default constructor ConnectionStateOnSentPacket in bandwidth_sampler.h

Reported by psali...@akamai.com, Aug 25 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8

Example URL:

Steps to reproduce the problem:
The are several initialised  members in default constructor of ConnectionStateOnSentPacket in net/quic/core/congestion_control/bandwidth_sampler.h

This minor problem was found by coverity.

What is the expected behavior?

What went wrong?
Not all fields are initialised, can be fixed by something like:

=== net/quic/core/congestion_control/bandwidth_sampler.h
@@ -241,8 +212,13 @@
     // PacketNumberIndexedQueue.
     ConnectionStateOnSentPacket()
         : sent_time(QuicTime::Zero()),
+          size(0),
+          total_bytes_sent(0),
+          total_bytes_sent_at_last_acked_packet(0),
           last_acked_packet_sent_time(QuicTime::Zero()),
-          last_acked_packet_ack_time(QuicTime::Zero()) {}
+          last_acked_packet_ack_time(QuicTime::Zero()),
+          total_bytes_acked_at_the_last_acked_packet(0),
+          is_app_limited(false) {}
   };

   typedef QuicLinkedHashMap<QuicPacketNumber, ConnectionStateOnSentPacket>

Did this work before? N/A 

Chrome version: 62.0.3196.2  Channel: n/a
OS Version: OS X 10.12.6
Flash Version:
 
Components: -Internals>Network Internals>Network>QUIC
Owner: zhongyi@chromium.org
Status: Assigned (was: Unconfirmed)
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c196e5998015478a7a8955643dcad0ba8b9ad62c

commit c196e5998015478a7a8955643dcad0ba8b9ad62c
Author: Zhongyi Shi <zhongyi@chromium.org>
Date: Sat Aug 26 00:00:59 2017

relnote: initialize member fields in default ConnectionStateOnSentPacket constructor.

Bug:  758889 
Change-Id: I9ab59728545c991b618154d45dbeff6eb3a5600a
Reviewed-on: https://chromium-review.googlesource.com/636453
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Commit-Queue: Zhongyi Shi <zhongyi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497600}
[modify] https://crrev.com/c196e5998015478a7a8955643dcad0ba8b9ad62c/net/quic/core/congestion_control/bandwidth_sampler.h

Status: Fixed (was: Assigned)

Sign in to add a comment