New issue
Advanced search Search tips

Issue 596277 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 596231



Sign in to add a comment

Tautologous DCHECKs in net/quic implementation

Project Member Reported by w...@chromium.org, Mar 19 2016

Issue description

Replacing DCHECK_OP()'s implementation with DCHECK((val1) op (val2)) in a debug build gives two compilation errors in net/quic:

https://code.google.com/p/chromium/codesearch#chromium/src/net/quic/quic_data_reader.cc&q=quic_data_reader.c&sq=package:chromium&l=57
  bool QuicDataReader::ReadUFloat16(uint64_t* result) {
    uint16_t value;
    if (!ReadUInt16(&value)) {
      return false;
    }
    ...
    *result -= exponent << kUFloat16MantissaBits;
    *result <<= exponent;
    DCHECK_GE(value, 1 << kUFloat16MantissaEffectiveBits);
->  DCHECK_LE(value, kUFloat16MaxValue);
    return true;
  }

https://code.google.com/p/chromium/codesearch#chromium/src/net/quic/quic_protocol.cc&q=quic_protocol.cc&sq=package:chromium&l=312
  QuicRstStreamFrame::QuicRstStreamFrame(QuicStreamId stream_id,
                                         QuicRstStreamErrorCode error_code,
                                         QuicStreamOffset bytes_written)
      : stream_id(stream_id), error_code(error_code), byte_offset(bytes_written) {
->  DCHECK_LE(error_code, numeric_limits<uint8_t>::max());
  }

 

Comment 1 by w...@chromium.org, Mar 19 2016

Owner: rch@chromium.org

Comment 2 by w...@chromium.org, Apr 14 2016

Blocking: 596231

Comment 3 by w...@chromium.org, Apr 14 2016

Cc: rch@chromium.org
Owner: w...@chromium.org
Status: Started (was: Untriaged)

Comment 4 by w...@chromium.org, Apr 28 2016

Fixed in the internal repo, and should roll to Chromium next week.

Comment 5 by w...@chromium.org, May 10 2016

Status: Fixed (was: Started)

Sign in to add a comment