[wami] Fix detection of type usages [v8/v8 : main]

0 views
Skip to first unread message

Jakob Kummerow (Gerrit)

unread,
4:11 PM (5 hours ago) 4:11 PM
to Jakob Kummerow, Clemens Backes, v8-re...@googlegroups.com
Attention needed from Clemens Backes

Jakob Kummerow voted and added 4 comments

Votes added by Jakob Kummerow

Auto-Submit+1
Commit-Queue+1

4 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Jakob Kummerow . resolved

PTAL. This fixes the issue you reported at https://issues.chromium.org/issues/513063392#comment10.

The bug was that every `supertype` use of a type was recorded as the first use of the type, so in this module:
```
(type $struct2 (descriptor $struct3) ...)
(type $struct3 ...)
(type $struct4 (super $struct3) ...)
```
we first saw $struct2 using $struct3, but then we overwrote that information when we saw that $struct4 also uses $struct3.

File tools/wasm/mjsunit-module-disassembler-impl.h
Line 1307, Patchset 1 (Latest): DCHECK(module_->has_cont_type(ModuleTypeIndex{i}));
Jakob Kummerow . resolved

Drive-by feature addition 😊

Line 1288, Patchset 1 (Latest): if (type.has_descriptor()) needed_at.Record(type.descriptor, i);
Jakob Kummerow . resolved

...here and in the next two lines is the meat of the CL.

Line 1272, Patchset 1 (Latest): if (needed.index < here) return;
if (needed_at_[needed.index] < here) return;
Jakob Kummerow . resolved

Reusing these checks...

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: Icafebcd672556cefa09476a1d9275dd37dc4ab58
Gerrit-Change-Number: 7860145
Gerrit-PatchSet: 1
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Attention: Clemens Backes <clem...@chromium.org>
Gerrit-Comment-Date: Tue, 19 May 2026 20:11:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Jakob Kummerow (Gerrit)

unread,
4:16 PM (5 hours ago) 4:16 PM
to Jakob Kummerow, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Clemens Backes, v8-re...@googlegroups.com
Attention needed from Clemens Backes

Jakob Kummerow added 1 comment

Patchset-level comments
Jakob Kummerow . resolved

+Matthias FYI in case it helps with the investigation of the linked bug.

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: Icafebcd672556cefa09476a1d9275dd37dc4ab58
Gerrit-Change-Number: 7860145
Gerrit-PatchSet: 1
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-CC: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Clemens Backes <clem...@chromium.org>
Gerrit-Comment-Date: Tue, 19 May 2026 20:16:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
5:28 PM (4 hours ago) 5:28 PM
to Jakob Kummerow, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Clemens Backes, v8-re...@googlegroups.com
Attention needed from Clemens Backes and Jakob Kummerow

Matthias Liedtke voted and added 2 comments

Votes added by Matthias Liedtke

Code-Review+1

2 comments

Patchset-level comments
Matthias Liedtke . resolved

LGTM

Commit Message
Line 10, Patchset 1 (Latest):before the type itself should find the *earliest* use of that index.
Matthias Liedtke . unresolved

Note that `PrintHeapType` also doesn't support exact heap types, so emission of exact casts doesn't do the right thing, so there seem to be multiple issues with custom descriptors and the mjsunit disassembly.

Open in Gerrit

Related details

Attention is currently required from:
  • Clemens Backes
  • Jakob Kummerow
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: Icafebcd672556cefa09476a1d9275dd37dc4ab58
Gerrit-Change-Number: 7860145
Gerrit-PatchSet: 1
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Attention: Clemens Backes <clem...@chromium.org>
Gerrit-Comment-Date: Tue, 19 May 2026 21:28:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages