Fix NOTREACHED crash in StreamPacketSocket::SetOption [chromium/src : main]

0 views
Skip to first unread message

Joe Downing (Gerrit)

unread,
Apr 21, 2026, 3:55:25 PM (3 days ago) Apr 21
to Yuwei Huang, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org
Attention needed from Yuwei Huang

Joe Downing added 1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Joe Downing . resolved

PTAL!

Open in Gerrit

Related details

Attention is currently required from:
  • Yuwei Huang
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I7e755aed97e23845c07b0be03fe663b818c606b5
Gerrit-Change-Number: 7782894
Gerrit-PatchSet: 4
Gerrit-Owner: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
Gerrit-Attention: Yuwei Huang <yuw...@chromium.org>
Gerrit-Comment-Date: Tue, 21 Apr 2026 19:55:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Yuwei Huang (Gerrit)

unread,
Apr 21, 2026, 4:15:26 PM (3 days ago) Apr 21
to Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org
Attention needed from Joe Downing

Yuwei Huang voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Joe Downing
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7e755aed97e23845c07b0be03fe663b818c606b5
    Gerrit-Change-Number: 7782894
    Gerrit-PatchSet: 4
    Gerrit-Owner: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
    Gerrit-Attention: Joe Downing <joe...@chromium.org>
    Gerrit-Comment-Date: Tue, 21 Apr 2026 20:15:20 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Joe Downing (Gerrit)

    unread,
    Apr 21, 2026, 4:15:52 PM (3 days ago) Apr 21
    to Yuwei Huang, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org

    Joe Downing voted and added 1 comment

    Votes added by Joe Downing

    Commit-Queue+2

    1 comment

    Patchset-level comments
    Joe Downing . resolved

    THanks!

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7e755aed97e23845c07b0be03fe663b818c606b5
    Gerrit-Change-Number: 7782894
    Gerrit-PatchSet: 4
    Gerrit-Owner: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
    Gerrit-Comment-Date: Tue, 21 Apr 2026 20:15:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Apr 21, 2026, 6:29:53 PM (2 days ago) Apr 21
    to Joe Downing, Yuwei Huang, chromium...@chromium.org, chromotin...@chromium.org

    Chromium LUCI CQ submitted the change

    Unreviewed changes

    4 is the latest approved patch-set.
    No files were changed between the latest approved patch-set and the submitted one.

    Change information

    Commit message:
    Fix NOTREACHED crash in StreamPacketSocket::SetOption

    WebRTC routinely calls SetOption() on transport ports during session
    negotiation (e.g., to apply OPT_DSCP or OPT_NODELAY). If the socket was
    closed or the option was unsupported, StreamPacketSocket::SetOption()
    would hit a NOTREACHED() macro.

    Historically, NOTREACHED() was ignored in Chromium Release builds,
    allowing the function to fall through and return -1. WebRTC's
    AsyncPacketSocket API contract correctly interprets -1 as "option
    unsupported" and gracefully continues.

    However, Chromium recently changed NOTREACHED() to be fatal in Release
    builds (acting like CHECK(false)). This caused the previously benign
    fall-through to become a fatal SIGTRAP crash.

    This change updates SetOption() to explicitly return -1 in these
    expected conditions instead of asserting, conforming to WebRTC's API
    contract. A unit test is also added to verify the fix.

    Additional unit tests for this class will be added in a follow-up
    CL to keep this one scoped to the fix.
    Bug: 447155162
    Change-Id: I7e755aed97e23845c07b0be03fe663b818c606b5
    Reviewed-by: Yuwei Huang <yuw...@chromium.org>
    Commit-Queue: Joe Downing <joe...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1618496}
    Files:
    • M remoting/protocol/BUILD.gn
    • M remoting/protocol/stream_packet_socket.cc
    • A remoting/protocol/stream_packet_socket_unittest.cc
    Change size: S
    Delta: 3 files changed, 31 insertions(+), 2 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Yuwei Huang
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7e755aed97e23845c07b0be03fe663b818c606b5
    Gerrit-Change-Number: 7782894
    Gerrit-PatchSet: 6
    Gerrit-Owner: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages