[go] cmd/compile: handle propagating an out-of-range jump table index

12 views
Skip to first unread message

Cuong Manh Le (Gerrit)

unread,
Dec 22, 2025, 6:52:36 AM (3 days ago) Dec 22
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Cuong Manh Le has uploaded the change for review

Commit message

cmd/compile: handle propagating an out-of-range jump table index

For an out-of-range jump table index, the constant facts should not be
propagated to the destinations.

TODO: add test

Fixes #76950
Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc

Change diff

diff --git a/src/cmd/compile/internal/ssa/sccp.go b/src/cmd/compile/internal/ssa/sccp.go
index 9b958d0..7ef8d6b 100644
--- a/src/cmd/compile/internal/ssa/sccp.go
+++ b/src/cmd/compile/internal/ssa/sccp.go
@@ -507,6 +507,10 @@
branchIdx = 1 - condLattice.val.AuxInt
} else {
branchIdx = condLattice.val.AuxInt
+ if branchIdx < 0 || branchIdx >= int64(len(block.Succs)) {
+ // unreachable code, do nothing then
+ break
+ }
}
t.edges = append(t.edges, block.Succs[branchIdx])
} else {

Change information

Files:
  • M src/cmd/compile/internal/ssa/sccp.go
Change size: XS
Delta: 1 file changed, 4 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
Gerrit-Change-Number: 731860
Gerrit-PatchSet: 1
Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Cuong Manh Le (Gerrit)

unread,
Dec 22, 2025, 8:01:36 AM (3 days ago) Dec 22
to goph...@pubsubhelper.golang.org, Keith Randall, David Chase, Yi Yang, golang-co...@googlegroups.com
Attention needed from David Chase and Keith Randall

Cuong Manh Le voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • David Chase
  • Keith Randall
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
Gerrit-Change-Number: 731860
Gerrit-PatchSet: 1
Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-CC: Yi Yang <qingf...@alibaba-inc.com>
Gerrit-Attention: Keith Randall <k...@golang.org>
Gerrit-Attention: David Chase <drc...@google.com>
Gerrit-Comment-Date: Mon, 22 Dec 2025 13:01:23 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

David Chase (Gerrit)

unread,
Dec 22, 2025, 8:56:07 AM (3 days ago) Dec 22
to Cuong Manh Le, goph...@pubsubhelper.golang.org, Go LUCI, Keith Randall, Yi Yang, golang-co...@googlegroups.com
Attention needed from Cuong Manh Le and Keith Randall

David Chase voted and added 1 comment

Votes added by David Chase

Code-Review+2

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
David Chase . resolved

thanks for fixing this.

Open in Gerrit

Related details

Attention is currently required from:
  • Cuong Manh Le
  • Keith Randall
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
Gerrit-Change-Number: 731860
Gerrit-PatchSet: 1
Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-CC: Yi Yang <qingf...@alibaba-inc.com>
Gerrit-Attention: Keith Randall <k...@golang.org>
Gerrit-Attention: Cuong Manh Le <cuong.m...@gmail.com>
Gerrit-Comment-Date: Mon, 22 Dec 2025 13:56:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Cherry Mui (Gerrit)

unread,
Dec 22, 2025, 11:48:42 AM (2 days ago) Dec 22
to Cuong Manh Le, goph...@pubsubhelper.golang.org, David Chase, Go LUCI, Keith Randall, Yi Yang, golang-co...@googlegroups.com
Attention needed from Cuong Manh Le and Keith Randall

Cherry Mui voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Cuong Manh Le
  • Keith Randall
Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
    Gerrit-Change-Number: 731860
    Gerrit-PatchSet: 1
    Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
    Gerrit-Reviewer: Cherry Mui <cher...@google.com>
    Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
    Gerrit-Reviewer: David Chase <drc...@google.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-CC: Yi Yang <qingf...@alibaba-inc.com>
    Gerrit-Attention: Keith Randall <k...@golang.org>
    Gerrit-Attention: Cuong Manh Le <cuong.m...@gmail.com>
    Gerrit-Comment-Date: Mon, 22 Dec 2025 16:48:39 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Dec 22, 2025, 7:45:53 PM (2 days ago) Dec 22
    to Cuong Manh Le, goph...@pubsubhelper.golang.org, Cherry Mui, David Chase, Go LUCI, Keith Randall, Yi Yang, golang-co...@googlegroups.com
    Attention needed from Cuong Manh Le

    Keith Randall added 1 comment

    Patchset-level comments
    Keith Randall . resolved

    Would be nice to have a test for this.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Cuong Manh Le
    Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
    Gerrit-Change-Number: 731860
    Gerrit-PatchSet: 1
    Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
    Gerrit-Reviewer: Cherry Mui <cher...@google.com>
    Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
    Gerrit-Reviewer: David Chase <drc...@google.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-CC: Yi Yang <qingf...@alibaba-inc.com>
    Gerrit-Attention: Cuong Manh Le <cuong.m...@gmail.com>
    Gerrit-Comment-Date: Tue, 23 Dec 2025 00:45:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    open
    diffy

    Cuong Manh Le (Gerrit)

    unread,
    Dec 22, 2025, 8:40:31 PM (2 days ago) Dec 22
    to goph...@pubsubhelper.golang.org, Cherry Mui, David Chase, Go LUCI, Keith Randall, Yi Yang, golang-co...@googlegroups.com
    Attention needed from Keith Randall

    Cuong Manh Le added 1 comment

    Patchset-level comments
    Keith Randall . resolved

    Would be nice to have a test for this.

    Cuong Manh Le

    Yes, I have been trying to simplify the original reproducer, it’s somewhat too long.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Keith Randall
    Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
    Gerrit-Change-Number: 731860
    Gerrit-PatchSet: 1
    Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
    Gerrit-Reviewer: Cherry Mui <cher...@google.com>
    Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
    Gerrit-Reviewer: David Chase <drc...@google.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-CC: Yi Yang <qingf...@alibaba-inc.com>
    Gerrit-Attention: Keith Randall <k...@golang.org>
    Gerrit-Comment-Date: Tue, 23 Dec 2025 01:40:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Keith Randall <k...@golang.org>
    satisfied_requirement
    open
    diffy

    Cuong Manh Le (Gerrit)

    unread,
    Dec 22, 2025, 8:40:55 PM (2 days ago) Dec 22
    to goph...@pubsubhelper.golang.org, Cherry Mui, David Chase, Go LUCI, Keith Randall, Yi Yang, golang-co...@googlegroups.com
    Attention needed from Keith Randall

    Cuong Manh Le voted Hold+1

    Related details

    Attention is currently required from:
    • Keith Randall
    Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Holds
    • requirement satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
    Gerrit-Change-Number: 731860
    Gerrit-PatchSet: 1
    Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
    Gerrit-Reviewer: Cherry Mui <cher...@google.com>
    Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
    Gerrit-Reviewer: David Chase <drc...@google.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-CC: Yi Yang <qingf...@alibaba-inc.com>
    Gerrit-Attention: Keith Randall <k...@golang.org>
    Gerrit-Comment-Date: Tue, 23 Dec 2025 01:40:48 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Cuong Manh Le (Gerrit)

    unread,
    Dec 23, 2025, 2:58:59 AM (yesterday) Dec 23
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Cherry Mui, David Chase and Keith Randall

    Cuong Manh Le uploaded new patchset

    Cuong Manh Le uploaded patch set #2 to this change.
    Following approvals got outdated and were removed:
    • Code-Review: +2 by David Chase, +1 by Cherry Mui
    • TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Cherry Mui
    • David Chase
    • Keith Randall
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Holds
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
    Gerrit-Change-Number: 731860
    Gerrit-PatchSet: 2
    Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
    Gerrit-Reviewer: Cherry Mui <cher...@google.com>
    Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
    Gerrit-Reviewer: David Chase <drc...@google.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-CC: Yi Yang <qingf...@alibaba-inc.com>
    Gerrit-Attention: Keith Randall <k...@golang.org>
    Gerrit-Attention: Cherry Mui <cher...@google.com>
    Gerrit-Attention: David Chase <drc...@google.com>
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Cuong Manh Le (Gerrit)

    unread,
    Dec 23, 2025, 2:59:09 AM (yesterday) Dec 23
    to goph...@pubsubhelper.golang.org, Cherry Mui, David Chase, Go LUCI, Keith Randall, Yi Yang, golang-co...@googlegroups.com
    Attention needed from Cherry Mui, David Chase and Keith Randall

    Cuong Manh Le voted

    Auto-Submit+1
    Commit-Queue+1
    Hold+0
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Cherry Mui
    • David Chase
    • Keith Randall
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
      Gerrit-Change-Number: 731860
      Gerrit-PatchSet: 2
      Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
      Gerrit-Reviewer: Cherry Mui <cher...@google.com>
      Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
      Gerrit-Reviewer: David Chase <drc...@google.com>
      Gerrit-Reviewer: Keith Randall <k...@golang.org>
      Gerrit-CC: Yi Yang <qingf...@alibaba-inc.com>
      Gerrit-Attention: Keith Randall <k...@golang.org>
      Gerrit-Attention: Cherry Mui <cher...@google.com>
      Gerrit-Attention: David Chase <drc...@google.com>
      Gerrit-Comment-Date: Tue, 23 Dec 2025 07:59:03 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Cuong Manh Le (Gerrit)

      unread,
      Dec 23, 2025, 3:00:50 AM (yesterday) Dec 23
      to goph...@pubsubhelper.golang.org, Cherry Mui, David Chase, Go LUCI, Keith Randall, Yi Yang, golang-co...@googlegroups.com
      Attention needed from Cherry Mui, David Chase and Keith Randall

      Cuong Manh Le added 1 comment

      Patchset-level comments
      Keith Randall . resolved

      Would be nice to have a test for this.

      Cuong Manh Le

      Yes, I have been trying to simplify the original reproducer, it’s somewhat too long.

      Cuong Manh Le

      Latest patch have added the test, PTAL.

      Gerrit-Comment-Date: Tue, 23 Dec 2025 08:00:39 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Keith Randall <k...@golang.org>
      Comment-In-Reply-To: Cuong Manh Le <cuong.m...@gmail.com>
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Cuong Manh Le (Gerrit)

      unread,
      Dec 23, 2025, 3:56:08 AM (yesterday) Dec 23
      to goph...@pubsubhelper.golang.org, Go LUCI, Cherry Mui, David Chase, Keith Randall, Yi Yang, golang-co...@googlegroups.com
      Attention needed from Cherry Mui, David Chase and Keith Randall

      Cuong Manh Le voted Commit-Queue+1

      Commit-Queue+1
      Gerrit-Comment-Date: Tue, 23 Dec 2025 08:56:01 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Cuong Manh Le (Gerrit)

      unread,
      Dec 23, 2025, 4:38:20 AM (yesterday) Dec 23
      to goph...@pubsubhelper.golang.org, Go LUCI, Cherry Mui, David Chase, Keith Randall, Yi Yang, golang-co...@googlegroups.com
      Gerrit-Comment-Date: Tue, 23 Dec 2025 09:38:12 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      David Chase (Gerrit)

      unread,
      Dec 23, 2025, 9:41:55 AM (yesterday) Dec 23
      to Cuong Manh Le, goph...@pubsubhelper.golang.org, Go LUCI, Cherry Mui, Keith Randall, Yi Yang, golang-co...@googlegroups.com
      Attention needed from Cherry Mui, Cuong Manh Le and Keith Randall

      David Chase voted Code-Review+2

      Code-Review+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Cherry Mui
      • Cuong Manh Le
      • Keith Randall
      Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
      Gerrit-Change-Number: 731860
      Gerrit-PatchSet: 2
      Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
      Gerrit-Reviewer: Cherry Mui <cher...@google.com>
      Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
      Gerrit-Reviewer: David Chase <drc...@google.com>
      Gerrit-Reviewer: Keith Randall <k...@golang.org>
      Gerrit-CC: Yi Yang <qingf...@alibaba-inc.com>
      Gerrit-Attention: Keith Randall <k...@golang.org>
      Gerrit-Attention: Cherry Mui <cher...@google.com>
      Gerrit-Attention: Cuong Manh Le <cuong.m...@gmail.com>
      Gerrit-Comment-Date: Tue, 23 Dec 2025 14:41:51 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Cherry Mui (Gerrit)

      unread,
      Dec 23, 2025, 10:31:27 AM (yesterday) Dec 23
      to Cuong Manh Le, goph...@pubsubhelper.golang.org, David Chase, Go LUCI, Keith Randall, Yi Yang, golang-co...@googlegroups.com
      Attention needed from Cuong Manh Le and Keith Randall

      Cherry Mui voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Cuong Manh Le
      • Keith Randall
      Submit Requirements:
        • requirement satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        • requirement satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
        Gerrit-Change-Number: 731860
        Gerrit-PatchSet: 2
        Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Reviewer: Cherry Mui <cher...@google.com>
        Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Reviewer: David Chase <drc...@google.com>
        Gerrit-Reviewer: Keith Randall <k...@golang.org>
        Gerrit-CC: Yi Yang <qingf...@alibaba-inc.com>
        Gerrit-Attention: Keith Randall <k...@golang.org>
        Gerrit-Attention: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Comment-Date: Tue, 23 Dec 2025 15:31:23 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Gopher Robot (Gerrit)

        unread,
        Dec 23, 2025, 10:33:02 AM (yesterday) Dec 23
        to Cuong Manh Le, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Cherry Mui, David Chase, Go LUCI, Keith Randall, Yi Yang, golang-co...@googlegroups.com

        Gopher Robot submitted the change

        Change information

        Commit message:
        cmd/compile: handle propagating an out-of-range jump table index

        For an out-of-range jump table index, the constant facts should not be
        propagated to the destinations.

        Fixes #76950
        Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
        Auto-Submit: Cuong Manh Le <cuong.m...@gmail.com>
        Reviewed-by: David Chase <drc...@google.com>
        Reviewed-by: Cherry Mui <cher...@google.com>
        Files:
        • M src/cmd/compile/internal/ssa/sccp.go
        • A test/fixedbugs/issue76950.go
        Change size: M
        Delta: 2 files changed, 71 insertions(+), 0 deletions(-)
        Branch: refs/heads/master
        Submit Requirements:
        • requirement satisfiedCode-Review: +2 by David Chase, +1 by Cherry Mui
        • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
        Gerrit-Change-Number: 731860
        Gerrit-PatchSet: 3
        Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Reviewer: Cherry Mui <cher...@google.com>
        Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Reviewer: David Chase <drc...@google.com>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        open
        diffy
        satisfied_requirement

        Cuong Manh Le (Gerrit)

        unread,
        Dec 23, 2025, 6:28:39 PM (yesterday) Dec 23
        to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

        Cuong Manh Le has uploaded the change for review

        Commit message

        [release-branch.go1.25] cmd/compile: handle propagating an out-of-range jump table index


        For an out-of-range jump table index, the constant facts should not be
        propagated to the destinations.

        Fixes #76967
        Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
        Auto-Submit: Cuong Manh Le <cuong.m...@gmail.com>
        Reviewed-by: David Chase <drc...@google.com>
        Reviewed-by: Cherry Mui <cher...@google.com>

        Change diff

        diff --git a/src/cmd/compile/internal/ssa/sccp.go b/src/cmd/compile/internal/ssa/sccp.go
        index ecc0f94..17f5452 100644
        --- a/src/cmd/compile/internal/ssa/sccp.go
        +++ b/src/cmd/compile/internal/ssa/sccp.go
        @@ -511,6 +511,10 @@

        branchIdx = 1 - condLattice.val.AuxInt
        } else {
        branchIdx = condLattice.val.AuxInt
        + if branchIdx < 0 || branchIdx >= int64(len(block.Succs)) {
        + // unreachable code, do nothing then
        + break
        + }
        }
        t.edges = append(t.edges, block.Succs[branchIdx])
        } else {
        diff --git a/test/fixedbugs/issue76950.go b/test/fixedbugs/issue76950.go
        new file mode 100644
        index 0000000..b5716e0
        --- /dev/null
        +++ b/test/fixedbugs/issue76950.go
        @@ -0,0 +1,67 @@
        +// compile
        +
        +// Copyright 2025 The Go Authors. All rights reserved.
        +// Use of this source code is governed by a BSD-style
        +// license that can be found in the LICENSE file.
        +
        +package p
        +
        +func MatchLog(input string) bool {
        + pos := 0
        + n := len(input)
        + matchState := -1
        + var c byte
        +
        + goto State12
        +
        +State8:
        + goto State65
        +
        +State12:
        + if pos >= n {
        + goto End
        + }
        + c = input[pos]
        + switch {
        + case c >= 0x09 && c <= 0x0A || c >= 0x0C && c <= 0x0D || c == ' ':
        + case c >= '0' && c <= '9':
        + case c >= 'A' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z':
        + case c == '[':
        + goto State8
        + case c == 'a':
        + default:
        + goto End
        + }
        +
        +State64:
        + matchState = 179
        + if pos >= n {
        + goto End
        + }
        + pos = n
        + goto State64
        +
        +State65:
        +
        +State66:
        + matchState = 181
        + if pos >= n {
        + goto End
        + }
        + pos = n
        + goto State66
        +
        +End:
        + if matchState != -1 {
        + switch matchState {
        + case 178:
        + case 156:
        + case 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175:
        + case 176, 177, 181, 182, 183:
        + case 179, 184:
        + case 180:
        + }
        + return true
        + }
        + return false
        +}

        Change information

        Files:
        • M src/cmd/compile/internal/ssa/sccp.go
        • A test/fixedbugs/issue76950.go
        Change size: M
        Delta: 2 files changed, 71 insertions(+), 0 deletions(-)
        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: newchange
        Gerrit-Project: go
        Gerrit-Branch: release-branch.go1.25
        Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
        Gerrit-Change-Number: 732460
        Gerrit-PatchSet: 1
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Cuong Manh Le (Gerrit)

        unread,
        Dec 23, 2025, 6:29:25 PM (yesterday) Dec 23
        to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

        Cuong Manh Le has uploaded the change for review

        Commit message

        [release-branch.go1.24] cmd/compile: handle propagating an out-of-range jump table index


        For an out-of-range jump table index, the constant facts should not be
        propagated to the destinations.

        Fixes #76966
        Gerrit-Branch: release-branch.go1.24
        Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
        Gerrit-Change-Number: 732480
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Cuong Manh Le (Gerrit)

        unread,
        Dec 23, 2025, 6:29:38 PM (yesterday) Dec 23
        to goph...@pubsubhelper.golang.org, Keith Randall, David Chase, golang-co...@googlegroups.com
        Attention needed from David Chase and Keith Randall

        Cuong Manh Le voted Commit-Queue+1

        Commit-Queue+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • David Chase
        • Keith Randall
        Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: release-branch.go1.25
        Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
        Gerrit-Change-Number: 732460
        Gerrit-PatchSet: 1
        Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Reviewer: David Chase <drc...@google.com>
        Gerrit-Reviewer: Keith Randall <k...@golang.org>
        Gerrit-Attention: Keith Randall <k...@golang.org>
        Gerrit-Attention: David Chase <drc...@google.com>
        Gerrit-Comment-Date: Tue, 23 Dec 2025 23:29:30 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Cuong Manh Le (Gerrit)

        unread,
        Dec 23, 2025, 6:29:55 PM (yesterday) Dec 23
        to goph...@pubsubhelper.golang.org, Keith Randall, David Chase, golang-co...@googlegroups.com
        Attention needed from David Chase and Keith Randall

        Cuong Manh Le voted Commit-Queue+1

        Commit-Queue+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • David Chase
        • Keith Randall
        Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: release-branch.go1.24
        Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
        Gerrit-Change-Number: 732480
        Gerrit-PatchSet: 1
        Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Reviewer: David Chase <drc...@google.com>
        Gerrit-Reviewer: Keith Randall <k...@golang.org>
        Gerrit-Attention: Keith Randall <k...@golang.org>
        Gerrit-Attention: David Chase <drc...@google.com>
        Gerrit-Comment-Date: Tue, 23 Dec 2025 23:29:47 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        David Chase (Gerrit)

        unread,
        Dec 23, 2025, 6:40:17 PM (yesterday) Dec 23
        to Cuong Manh Le, goph...@pubsubhelper.golang.org, Go LUCI, Keith Randall, golang-co...@googlegroups.com
        Attention needed from Cuong Manh Le and Keith Randall

        David Chase voted Code-Review+2

        Code-Review+2
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Cuong Manh Le
        • Keith Randall
        Submit Requirements:
        • requirement satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: release-branch.go1.25
        Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
        Gerrit-Change-Number: 732460
        Gerrit-PatchSet: 1
        Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Reviewer: David Chase <drc...@google.com>
        Gerrit-Reviewer: Keith Randall <k...@golang.org>
        Gerrit-Attention: Keith Randall <k...@golang.org>
        Gerrit-Attention: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Comment-Date: Tue, 23 Dec 2025 23:40:12 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        David Chase (Gerrit)

        unread,
        Dec 23, 2025, 6:40:26 PM (yesterday) Dec 23
        to Cuong Manh Le, goph...@pubsubhelper.golang.org, Go LUCI, Keith Randall, golang-co...@googlegroups.com
        Attention needed from Cuong Manh Le and Keith Randall

        David Chase voted Code-Review+2

        Code-Review+2
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Cuong Manh Le
        • Keith Randall
        Submit Requirements:
        • requirement satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: release-branch.go1.24
        Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
        Gerrit-Change-Number: 732480
        Gerrit-PatchSet: 1
        Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Reviewer: David Chase <drc...@google.com>
        Gerrit-Reviewer: Keith Randall <k...@golang.org>
        Gerrit-Attention: Keith Randall <k...@golang.org>
        Gerrit-Attention: Cuong Manh Le <cuong.m...@gmail.com>
        Gerrit-Comment-Date: Tue, 23 Dec 2025 23:40:23 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Michael Knyszek (Gerrit)

        unread,
        12:07 AM (21 hours ago) 12:07 AM
        to Cuong Manh Le, goph...@pubsubhelper.golang.org, Go LUCI, David Chase, Keith Randall, golang-co...@googlegroups.com
        Attention needed from Cuong Manh Le and Keith Randall

        Michael Knyszek voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Cuong Manh Le
        • Keith Randall
        Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          • requirement satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: release-branch.go1.25
          Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
          Gerrit-Change-Number: 732460
          Gerrit-PatchSet: 1
          Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
          Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
          Gerrit-Reviewer: David Chase <drc...@google.com>
          Gerrit-Reviewer: Keith Randall <k...@golang.org>
          Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
          Gerrit-Attention: Keith Randall <k...@golang.org>
          Gerrit-Attention: Cuong Manh Le <cuong.m...@gmail.com>
          Gerrit-Comment-Date: Wed, 24 Dec 2025 05:07:52 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Michael Knyszek (Gerrit)

          unread,
          12:08 AM (21 hours ago) 12:08 AM
          to Cuong Manh Le, goph...@pubsubhelper.golang.org, Go LUCI, David Chase, Keith Randall, golang-co...@googlegroups.com
          Attention needed from Cuong Manh Le and Keith Randall

          Michael Knyszek voted and added 1 comment

          Votes added by Michael Knyszek

          Code-Review+1

          1 comment

          Patchset-level comments
          File-level comment, Patchset 1 (Latest):
          Michael Knyszek . unresolved

          waiting cherry pick approval

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Cuong Manh Le
          • Keith Randall
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          • requirement satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: release-branch.go1.24
          Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
          Gerrit-Change-Number: 732480
          Gerrit-PatchSet: 1
          Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
          Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
          Gerrit-Reviewer: David Chase <drc...@google.com>
          Gerrit-Reviewer: Keith Randall <k...@golang.org>
          Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
          Gerrit-Attention: Keith Randall <k...@golang.org>
          Gerrit-Attention: Cuong Manh Le <cuong.m...@gmail.com>
          Gerrit-Comment-Date: Wed, 24 Dec 2025 05:08:32 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Michael Knyszek (Gerrit)

          unread,
          12:08 AM (21 hours ago) 12:08 AM
          to Cuong Manh Le, goph...@pubsubhelper.golang.org, Go LUCI, David Chase, Keith Randall, golang-co...@googlegroups.com
          Attention needed from Cuong Manh Le and Keith Randall

          Michael Knyszek added 1 comment

          Patchset-level comments
          File-level comment, Patchset 1 (Latest):
          Michael Knyszek . unresolved

          waiting cherry pick approval

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Cuong Manh Le
          • Keith Randall
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          • requirement satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: release-branch.go1.25
          Gerrit-Change-Id: Iff29814cb466c7aaa432cec212e5387665c45afc
          Gerrit-Change-Number: 732460
          Gerrit-PatchSet: 1
          Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
          Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
          Gerrit-Reviewer: David Chase <drc...@google.com>
          Gerrit-Reviewer: Keith Randall <k...@golang.org>
          Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
          Gerrit-Attention: Keith Randall <k...@golang.org>
          Gerrit-Attention: Cuong Manh Le <cuong.m...@gmail.com>
          Gerrit-Comment-Date: Wed, 24 Dec 2025 05:08:40 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages