[runtime] Only use part of SlowEquals to internalize strings [v8/v8 : main]

0 views
Skip to first unread message

Toon Verwaest (Gerrit)

unread,
Sep 25, 2025, 11:27:26 AM (2 days ago) Sep 25
to Patrick Thier, v8-re...@googlegroups.com
Attention needed from Patrick Thier

Toon Verwaest voted and added 1 comment

Votes added by Toon Verwaest

Auto-Submit+1
Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Toon Verwaest . resolved

ptal

Open in Gerrit

Related details

Attention is currently required from:
  • Patrick Thier
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: Icb199a135009606a47a22fe5559f709ec0cbfd77
Gerrit-Change-Number: 6983089
Gerrit-PatchSet: 2
Gerrit-Owner: Toon Verwaest <verw...@chromium.org>
Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
Gerrit-Attention: Patrick Thier <pth...@chromium.org>
Gerrit-Comment-Date: Thu, 25 Sep 2025 15:27:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Patrick Thier (Gerrit)

unread,
Sep 26, 2025, 4:50:16 AM (yesterday) Sep 26
to Toon Verwaest, V8 LUCI CQ, v8-re...@googlegroups.com
Attention needed from Toon Verwaest

Patrick Thier added 1 comment

File src/objects/string-table.cc
Line 197, Patchset 2 (Latest): return string_->SlowEqualsNonThinSameLength(length(), string);
Patrick Thier . unresolved

Unfortunately I don't think this is correct. We can have a `ThinString` here in world with shared strings.
If the string gets concurrently internalized between [1] and [2]. At [3] or [4] a GC can happen, which can transition the string into a `ThinString`. In the lookup at [2], we can then have a `ThinString` here.

[1] https://crsrc.org/c/v8/src/objects/string-table.cc;drc=1b94e215657f5c9b043a225449370e42f614fee0;l=389
[2] https://crsrc.org/c/v8/src/objects/string-table.cc;drc=8a1988938d4298fbe8fb499b1a59fe4b04a21b15;l=457
[3] https://crsrc.org/c/v8/src/objects/string-table.cc;drc=8a1988938d4298fbe8fb499b1a59fe4b04a21b15;l=448
[4] https://crsrc.org/c/v8/src/objects/string-table.cc;drc=8a1988938d4298fbe8fb499b1a59fe4b04a21b15;l=452

Open in Gerrit

Related details

Attention is currently required from:
  • Toon Verwaest
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: Icb199a135009606a47a22fe5559f709ec0cbfd77
    Gerrit-Change-Number: 6983089
    Gerrit-PatchSet: 2
    Gerrit-Owner: Toon Verwaest <verw...@chromium.org>
    Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
    Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
    Gerrit-Attention: Toon Verwaest <verw...@chromium.org>
    Gerrit-Comment-Date: Fri, 26 Sep 2025 08:50:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages