[wasm] Fix nullptr deref in Liftoff debug side table coverage [v8/v8 : main]

0 views
Skip to first unread message

Tejas Vasisht (Gerrit)

unread,
Jul 21, 2026, 12:08:40 PM (4 days ago) Jul 21
to Clemens Backes, Paolo Severini, v8-re...@googlegroups.com, was...@google.com

Tejas Vasisht added 2 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Tejas Vasisht . resolved

Done. Thanks!

Commit Message
Line 7, Patchset 1:[wasm] Fix nullptr deref in GenerateLiftoffDebugSideTable with --wasm-code-coverage
Clemens Backes . resolved

Please try to make this first line shorter (see https://chromium.googlesource.com/chromium/src/+/HEAD/docs/contributing.md#uploading-a-change-for-review).

Tejas Vasisht

Done

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: Ibb2840a1e86491a2f06aa5c5407c3c6b2279d1ce
Gerrit-Change-Number: 8123980
Gerrit-PatchSet: 3
Gerrit-Owner: Tejas Vasisht <tejasv...@microsoft.com>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Paolo Severini <paol...@microsoft.com>
Gerrit-Comment-Date: Tue, 21 Jul 2026 16:08:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Clemens Backes <clem...@chromium.org>
satisfied_requirement
open
diffy

Tejas Vasisht (Gerrit)

unread,
Jul 21, 2026, 12:17:30 PM (4 days ago) Jul 21
to Clemens Backes, Paolo Severini, v8-re...@googlegroups.com, was...@google.com

Tejas Vasisht 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: Ibb2840a1e86491a2f06aa5c5407c3c6b2279d1ce
Gerrit-Change-Number: 8123980
Gerrit-PatchSet: 3
Gerrit-Owner: Tejas Vasisht <tejasv...@microsoft.com>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Paolo Severini <paol...@microsoft.com>
Gerrit-Reviewer: Tejas Vasisht <tejasv...@microsoft.com>
Gerrit-Comment-Date: Tue, 21 Jul 2026 16:17:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Tejas Vasisht (Gerrit)

unread,
Jul 23, 2026, 6:51:27 PM (2 days ago) Jul 23
to v8-s...@luci-project-accounts.iam.gserviceaccount.com, Clemens Backes, Paolo Severini, v8-re...@googlegroups.com, was...@google.com
Attention needed from Clemens Backes and Paolo Severini

Tejas Vasisht added 1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Tejas Vasisht . resolved

Hello clemensb@, paolosev@. Updated the fix based on the CQ failures. The guard fixed the null dereference, but caused mismatched PC offsets. The dummy compilation now reuses the existing coverage data so its layout matches the original code. Also rebased onto the latest main.

Open in Gerrit

Related details

Attention is currently required from:
  • Clemens Backes
  • Paolo Severini
Submit Requirements:
  • 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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ibb2840a1e86491a2f06aa5c5407c3c6b2279d1ce
Gerrit-Change-Number: 8123980
Gerrit-PatchSet: 5
Gerrit-Owner: Tejas Vasisht <tejasv...@microsoft.com>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Paolo Severini <paol...@microsoft.com>
Gerrit-Reviewer: Tejas Vasisht <tejasv...@microsoft.com>
Gerrit-Attention: Paolo Severini <paol...@microsoft.com>
Gerrit-Attention: Clemens Backes <clem...@chromium.org>
Gerrit-Comment-Date: Thu, 23 Jul 2026 22:51:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Paolo Severini (Gerrit)

unread,
Jul 24, 2026, 4:34:43 AM (yesterday) Jul 24
to Tejas Vasisht, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Clemens Backes, v8-re...@googlegroups.com, was...@google.com
Attention needed from Clemens Backes and Tejas Vasisht

Paolo Severini added 1 comment

File src/wasm/baseline/liftoff-compiler.cc
Line 1681, Patchset 5 (Latest): if (V8_UNLIKELY(coverage_instrumentation_ && (opcode != kExprLoop))) {
Paolo Severini . resolved

Why this change?

Open in Gerrit

Related details

Attention is currently required from:
  • Clemens Backes
  • Tejas Vasisht
Submit Requirements:
  • 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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ibb2840a1e86491a2f06aa5c5407c3c6b2279d1ce
Gerrit-Change-Number: 8123980
Gerrit-PatchSet: 5
Gerrit-Owner: Tejas Vasisht <tejasv...@microsoft.com>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Paolo Severini <paol...@microsoft.com>
Gerrit-Reviewer: Tejas Vasisht <tejasv...@microsoft.com>
Gerrit-Attention: Tejas Vasisht <tejasv...@microsoft.com>
Gerrit-Attention: Clemens Backes <clem...@chromium.org>
Gerrit-Comment-Date: Fri, 24 Jul 2026 08:34:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Clemens Backes (Gerrit)

unread,
Jul 24, 2026, 4:42:09 AM (yesterday) Jul 24
to Tejas Vasisht, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Paolo Severini, v8-re...@googlegroups.com, was...@google.com
Attention needed from Tejas Vasisht

Clemens Backes added 1 comment

Patchset-level comments
Tejas Vasisht . unresolved

Hello clemensb@, paolosev@. Updated the fix based on the CQ failures. The guard fixed the null dereference, but caused mismatched PC offsets. The dummy compilation now reuses the existing coverage data so its layout matches the original code. Also rebased onto the latest main.

Clemens Backes

What do you mean by "caused mismatched PC offsets"? The entries in the debug side table did not match any more? How does that depend on code coverage?

If there's a good reason to enforce the emission of code coverage instrumentation when generating the debug side table, then I think it's an acceptable solution, but I'd like to understand a bit better why the simple solution does not work. Maybe there's a bug elsewhere.

Open in Gerrit

Related details

Attention is currently required from:
  • Tejas Vasisht
Submit Requirements:
    • requirement 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: Ibb2840a1e86491a2f06aa5c5407c3c6b2279d1ce
    Gerrit-Change-Number: 8123980
    Gerrit-PatchSet: 5
    Gerrit-Owner: Tejas Vasisht <tejasv...@microsoft.com>
    Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
    Gerrit-Reviewer: Paolo Severini <paol...@microsoft.com>
    Gerrit-Reviewer: Tejas Vasisht <tejasv...@microsoft.com>
    Gerrit-Attention: Tejas Vasisht <tejasv...@microsoft.com>
    Gerrit-Comment-Date: Fri, 24 Jul 2026 08:42:04 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Tejas Vasisht <tejasv...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Tejas Vasisht (Gerrit)

    unread,
    Jul 24, 2026, 1:34:16 PM (15 hours ago) Jul 24
    to v8-s...@luci-project-accounts.iam.gserviceaccount.com, Clemens Backes, Paolo Severini, v8-re...@googlegroups.com, was...@google.com
    Attention needed from Clemens Backes

    Tejas Vasisht added 1 comment

    Patchset-level comments
    Tejas Vasisht . resolved

    Hello clemensb@, paolosev@. Updated the fix based on the CQ failures. The guard fixed the null dereference, but caused mismatched PC offsets. The dummy compilation now reuses the existing coverage data so its layout matches the original code. Also rebased onto the latest main.

    Clemens Backes

    What do you mean by "caused mismatched PC offsets"? The entries in the debug side table did not match any more? How does that depend on code coverage?

    If there's a good reason to enforce the emission of code coverage instrumentation when generating the debug side table, then I think it's an acceptable solution, but I'd like to understand a bit better why the simple solution does not work. Maybe there's a bug elsewhere.

    Tejas Vasisht

    The original Liftoff compilation emits emit_inc_i32_at instructions for coverage. Those instructions change the PC offsets where debug-side-table entries are registered. GenerateLiftoffDebugSideTable() recompiles the function and uses that new table to inspect the original code. If regeneration skips coverage instrumentation, its offsets no longer match the original coverage-instrumented code.
    Reusing the existing coverage data makes both compilations emit the same layout.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Clemens Backes
    Submit Requirements:
      • 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: v8/v8
      Gerrit-Branch: main
      Gerrit-Change-Id: Ibb2840a1e86491a2f06aa5c5407c3c6b2279d1ce
      Gerrit-Change-Number: 8123980
      Gerrit-PatchSet: 5
      Gerrit-Owner: Tejas Vasisht <tejasv...@microsoft.com>
      Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
      Gerrit-Reviewer: Paolo Severini <paol...@microsoft.com>
      Gerrit-Reviewer: Tejas Vasisht <tejasv...@microsoft.com>
      Gerrit-Attention: Clemens Backes <clem...@chromium.org>
      Gerrit-Comment-Date: Fri, 24 Jul 2026 17:34:11 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Tejas Vasisht <tejasv...@microsoft.com>
      Comment-In-Reply-To: Clemens Backes <clem...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages