More UNREACHABLE after switches over enums [v8/v8 : main]

0 views
Skip to first unread message

Maksim Ivanov (Gerrit)

unread,
May 26, 2026, 3:53:32 AM (5 days ago) May 26
to Omer Katz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, SLSA Policy Verification Service, devtools-...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, leszek...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org, was...@google.com
Attention needed from Omer Katz

Maksim Ivanov added 1 comment

File test/cctest/compiler/turboshaft-codegen-tester.h
Line 483, Patchset 1 (Latest): UNREACHABLE();
Maksim Ivanov . unresolved

Changes in the tests aren't super useful now, but if we eventually get the warning implemented in Clang we'd need this anyway I think.

Open in Gerrit

Related details

Attention is currently required from:
  • Omer Katz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • 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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I8261bb445074091661d416c2c78603064f39cd68
Gerrit-Change-Number: 7868895
Gerrit-PatchSet: 1
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Omer Katz <omer...@chromium.org>
Gerrit-Comment-Date: Tue, 26 May 2026 07:53:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
May 26, 2026, 3:57:32 AM (5 days ago) May 26
to Maksim Ivanov, Omer Katz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, SLSA Policy Verification Service, devtools-...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, leszek...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org, was...@google.com
Attention needed from Maksim Ivanov

Michael Lippautz voted and added 1 comment

Votes added by Michael Lippautz

Code-Review+1

1 comment

File test/cctest/compiler/turboshaft-codegen-tester.h
Maksim Ivanov . unresolved

Changes in the tests aren't super useful now, but if we eventually get the warning implemented in Clang we'd need this anyway I think.

Michael Lippautz

What's the plan in terms of flags here? IIRC, the tradeoff didn't suggest a clear winner and all options had some downsides.

Open in Gerrit

Related details

Attention is currently required from:
  • Maksim Ivanov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I8261bb445074091661d416c2c78603064f39cd68
Gerrit-Change-Number: 7868895
Gerrit-PatchSet: 1
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-CC: Omer Katz <omer...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Comment-Date: Tue, 26 May 2026 07:57:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Maksim Ivanov <em...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Maksim Ivanov (Gerrit)

unread,
May 26, 2026, 4:00:24 AM (5 days ago) May 26
to Michael Lippautz, Omer Katz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, SLSA Policy Verification Service, devtools-...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, leszek...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org, was...@google.com

Maksim Ivanov voted and added 1 comment

Votes added by Maksim Ivanov

Commit-Queue+2

1 comment

File test/cctest/compiler/turboshaft-codegen-tester.h
Maksim Ivanov . resolved

Changes in the tests aren't super useful now, but if we eventually get the warning implemented in Clang we'd need this anyway I think.

Michael Lippautz

What's the plan in terms of flags here? IIRC, the tradeoff didn't suggest a clear winner and all options had some downsides.

Maksim Ivanov

I already have a couple of PRs in the LLVM repo for new diagnostics. The agreement is still not reached and there are some subtle details to be figured out, but I'll keep working on it and hopefully find a path forward.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • 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: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I8261bb445074091661d416c2c78603064f39cd68
    Gerrit-Change-Number: 7868895
    Gerrit-PatchSet: 1
    Gerrit-Owner: Maksim Ivanov <em...@google.com>
    Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Omer Katz <omer...@chromium.org>
    Gerrit-Comment-Date: Tue, 26 May 2026 08:00:19 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Maksim Ivanov <em...@google.com>
    Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
    satisfied_requirement
    open
    diffy

    Michael Lippautz (Gerrit)

    unread,
    May 26, 2026, 4:08:32 AM (5 days ago) May 26
    to Maksim Ivanov, Omer Katz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, SLSA Policy Verification Service, devtools-...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, leszek...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org, was...@google.com
    Attention needed from Maksim Ivanov

    Michael Lippautz added 1 comment

    File test/cctest/compiler/turboshaft-codegen-tester.h
    Maksim Ivanov . resolved

    Changes in the tests aren't super useful now, but if we eventually get the warning implemented in Clang we'd need this anyway I think.

    Michael Lippautz

    What's the plan in terms of flags here? IIRC, the tradeoff didn't suggest a clear winner and all options had some downsides.

    Maksim Ivanov

    I already have a couple of PRs in the LLVM repo for new diagnostics. The agreement is still not reached and there are some subtle details to be figured out, but I'll keep working on it and hopefully find a path forward.

    Michael Lippautz

    Ack

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Maksim Ivanov
    Submit Requirements:
    • 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: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I8261bb445074091661d416c2c78603064f39cd68
    Gerrit-Change-Number: 7868895
    Gerrit-PatchSet: 1
    Gerrit-Owner: Maksim Ivanov <em...@google.com>
    Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Omer Katz <omer...@chromium.org>
    Gerrit-Attention: Maksim Ivanov <em...@google.com>
    Gerrit-Comment-Date: Tue, 26 May 2026 08:08:29 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    open
    diffy

    Maksim Ivanov (Gerrit)

    unread,
    May 26, 2026, 4:26:07 AM (5 days ago) May 26
    to Michael Lippautz, Omer Katz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, SLSA Policy Verification Service, devtools-...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, leszek...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org, was...@google.com
    Attention needed from Maksim Ivanov

    Maksim Ivanov removed a vote from this change

    Removed Commit-Queue+2 by Maksim Ivanov <em...@google.com>
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Maksim Ivanov
    Submit Requirements:
    • 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: deleteVote
    satisfied_requirement
    open
    diffy

    Maksim Ivanov (Gerrit)

    unread,
    May 26, 2026, 4:39:17 AM (5 days ago) May 26
    to SLSA Policy Verification Service, Michael Lippautz, Omer Katz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, devtools-...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, leszek...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org, was...@google.com

    Maksim Ivanov voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • 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: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I8261bb445074091661d416c2c78603064f39cd68
    Gerrit-Change-Number: 7868895
    Gerrit-PatchSet: 2
    Gerrit-Owner: Maksim Ivanov <em...@google.com>
    Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Omer Katz <omer...@chromium.org>
    Gerrit-Comment-Date: Tue, 26 May 2026 08:39:13 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    v8-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

    unread,
    May 26, 2026, 5:26:38 AM (5 days ago) May 26
    to Maksim Ivanov, SLSA Policy Verification Service, Michael Lippautz, Omer Katz, Hannes Payer, devtools-...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, leszek...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org, was...@google.com

    v8-s...@luci-project-accounts.iam.gserviceaccount.com submitted the change with unreviewed changes

    Unreviewed changes

    1 is the latest approved patch-set.
    The change was submitted with unreviewed changes in the following files:

    ```
    The name of the file: src/compiler/backend/instruction-codes.h
    Insertions: 1, Deletions: 1.

    @@ -8,7 +8,6 @@
    #include <iosfwd>

    #if V8_TARGET_ARCH_ARM
    -#include "src/base/logging.h"
    #include "src/compiler/backend/arm/instruction-codes-arm.h"
    #elif V8_TARGET_ARCH_ARM64
    #include "src/compiler/backend/arm64/instruction-codes-arm64.h"
    @@ -31,6 +30,7 @@
    #define TARGET_ADDRESSING_MODE_LIST(V)
    #endif
    #include "src/base/bit-field.h"
    +#include "src/base/logging.h"
    #include "src/codegen/atomic-memory-order.h"
    #include "src/codegen/macro-assembler.h"
    #include "src/compiler/globals.h"
    ```

    Change information

    Commit message:
    More UNREACHABLE after switches over enums

    Gemini was used to build a Clang AST traversal that deterministically
    finds switches that are last blocks in non-void functions.

    As before, the goal of the effort is to prevent UB when a corrupted
    in-sandbox enum value occurs; the CL is not limited to only functions
    whose arguments are read from the sandbox.
    Bug: 390617721
    Change-Id: I8261bb445074091661d416c2c78603064f39cd68
    SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Reviewed-by: Michael Lippautz <mlip...@chromium.org>
    Commit-Queue: Maksim Ivanov <em...@google.com>
    Cr-Commit-Position: refs/heads/main@{#107548}
    Files:
    • M src/base/bounded-page-allocator.cc
    • M src/base/bounded-page-allocator.h
    • M src/base/virtual-address-space-page-allocator.cc
    • M src/baseline/baseline-compiler.cc
    • M src/builtins/builtins-call-gen.cc
    • M src/builtins/builtins-inl.h
    • M src/builtins/builtins-math.cc
    • M src/builtins/builtins.cc
    • M src/codegen/external-reference.cc
    • M src/common/globals.h
    • M src/compiler/backend/instruction-codes.h
    • M src/compiler/backend/instruction-selector.cc
    • M src/compiler/backend/instruction.cc
    • M src/compiler/backend/instruction.h
    • M src/compiler/backend/register-allocation.h
    • M src/compiler/backend/register-allocator.cc
    • M src/compiler/backend/x64/code-generator-x64.cc
    • M src/compiler/backend/x64/instruction-selector-x64.cc
    • M src/compiler/fast-api-calls.cc
    • M src/compiler/heap-refs.cc
    • M src/compiler/js-type-hint-lowering.cc
    • M src/compiler/machine-operator.cc
    • M src/compiler/simplified-lowering.cc
    • M src/compiler/simplified-operator.cc
    • M src/compiler/turbofan-typer.cc
    • M src/compiler/turboshaft/assembler.h
    • M src/compiler/turboshaft/fast-api-call-lowering-reducer.h
    • M src/compiler/turboshaft/graph-builder.cc
    • M src/compiler/turboshaft/index.h
    • M src/compiler/turboshaft/loop-unrolling-reducer.cc
    • M src/compiler/turboshaft/machine-lowering-reducer-inl.h
    • M src/compiler/turboshaft/machine-optimization-reducer.h
    • M src/compiler/turboshaft/operations.h
    • M src/compiler/turboshaft/representations.h
    • M src/compiler/turboshaft/string-escape-analysis-reducer.h
    • M src/compiler/turboshaft/turbolev-graph-builder.cc
    • M src/compiler/turboshaft/typer.h
    • M src/compiler/turboshaft/types.cc
    • M src/compiler/turboshaft/types.h
    • M src/debug/debug-interface.cc
    • M src/deoptimizer/deoptimizer.cc
    • M src/diagnostics/objects-printer.cc
    • M src/execution/arguments.h
    • M src/execution/vm-state-inl.h
    • M src/flags/flags.cc
    • M src/heap/cppgc/stats-collector.h
    • M src/heap/gc-tracer.cc
    • M src/heap/heap-allocator.cc
    • M src/heap/heap-controller.cc
    • M src/heap/heap.h
    • M src/heap/incremental-marking.cc
    • M src/heap/incremental-marking.h
    • M src/heap/mark-compact.cc
    • M src/heap/marking-barrier.h
    • M src/heap/memory-allocator.h
    • M src/heap/slot-set.h
    • M src/heap/spaces-inl.h
    • M src/inspector/v8-debugger-agent-impl.cc
    • M src/interpreter/interpreter-assembler.cc
    • M src/json/json-parser.cc
    • M src/libplatform/default-platform.h
    • M src/maglev/maglev-assembler.h
    • M src/maglev/maglev-graph-builder.cc
    • M src/maglev/maglev-graph-builder.h
    • M src/maglev/maglev-graph-optimizer.cc
    • M src/maglev/maglev-graph-processor.h
    • M src/maglev/maglev-interpreter-frame-state.cc
    • M src/maglev/maglev-ir.cc
    • M src/maglev/maglev-ir.h
    • M src/maglev/maglev-known-node-aspects.h
    • M src/maglev/maglev-phi-representation-selector.cc
    • M src/maglev/maglev-pre-regalloc-codegen-processors.h
    • M src/maglev/maglev-reducer-inl.h
    • M src/objects/intl-objects.cc
    • M src/objects/js-collator.cc
    • M src/objects/js-date-time-format.cc
    • M src/objects/js-display-names.cc
    • M src/objects/js-duration-format.cc
    • M src/objects/js-number-format.cc
    • M src/objects/js-regexp-inl.h
    • M src/objects/string-inl.h
    • M src/parsing/pending-compilation-error-handler.cc
    • M src/parsing/scanner.cc
    • M src/profiler/profile-generator.h
    • M src/regexp/experimental/experimental-interpreter.cc
    • M src/regexp/regexp-interpreter.cc
    • M src/regexp/regexp-parser.cc
    • M src/runtime/runtime-object.cc
    • M src/snapshot/code-serializer.cc
    • M src/snapshot/deserializer.cc
    • M src/snapshot/serializer.cc
    • M src/strings/uri.cc
    • M src/torque/instructions.h
    • M src/torque/ls/message-handler.cc
    • M src/wasm/c-api.cc
    • M src/wasm/constant-expression-interface.cc
    • M src/wasm/constant-expression.cc
    • M src/wasm/fuzzing/random-module-generation.cc
    • M src/wasm/turboshaft-graph-interface-inl.h
    • M src/wasm/turboshaft-graph-interface.cc
    • M src/wasm/value-type.h
    • M src/wasm/wasm-code-manager.cc
    • M src/wasm/wasm-code-manager.h
    • M src/wasm/wasm-debug.cc
    • M src/wasm/wasm-features.h
    • M src/wasm/wasm-init-expr.h
    • M src/wasm/wasm-module-builder.cc
    • M src/wasm/wasm-subtyping.cc
    • M src/wasm/wasm-value.h
    • M test/cctest/compiler/turboshaft-codegen-tester.h
    • M test/cctest/compiler/turboshaft-test-select-combine.cc
    • M test/unittests/compiler/backend/turboshaft-instruction-selector-unittest.h
    • M test/unittests/compiler/turboshaft/loop-unrolling-analyzer-unittest.cc
    • M test/unittests/wasm/wasm-usecounters.cc
    • M tools/wasm/mjsunit-module-disassembler-impl.h
    Change size: L
    Delta: 115 files changed, 342 insertions(+), 1 deletion(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Michael Lippautz
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I8261bb445074091661d416c2c78603064f39cd68
    Gerrit-Change-Number: 7868895
    Gerrit-PatchSet: 3
    Gerrit-Owner: Maksim Ivanov <em...@google.com>
    Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages