[S] Change in dart/sdk[main]: [vm,dyn_modules] Fix evaluation expression function self-reference.

0 views
Skip to first unread message

Tess Strickland (Gerrit)

unread,
Nov 25, 2025, 12:37:58 PM (7 days ago) Nov 25
to Alexander Markov, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Alexander Markov

Tess Strickland voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Markov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • 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: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Id04735059d00d964a8f00885857d3255c18ecf99
Gerrit-Change-Number: 464520
Gerrit-PatchSet: 1
Gerrit-Owner: Tess Strickland <sstr...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Alexander Markov <alexm...@google.com>
Gerrit-Comment-Date: Tue, 25 Nov 2025 17:37:53 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Tess Strickland (Gerrit)

unread,
Nov 26, 2025, 8:14:30 AM (6 days ago) Nov 26
to Commit Queue, Alexander Markov, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Alexander Markov

Tess Strickland voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Markov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • 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: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Id04735059d00d964a8f00885857d3255c18ecf99
Gerrit-Change-Number: 464520
Gerrit-PatchSet: 3
Gerrit-Owner: Tess Strickland <sstr...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Alexander Markov <alexm...@google.com>
Gerrit-Comment-Date: Wed, 26 Nov 2025 13:14:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexander Markov (Gerrit)

unread,
Dec 1, 2025, 10:30:57 AM (yesterday) Dec 1
to Tess Strickland, Alexander Markov, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Tess Strickland

Alexander Markov voted and added 1 comment

Votes added by Alexander Markov

Code-Review+1

1 comment

File runtime/vm/bytecode_reader.cc
Line 1091, Patchset 3 (Latest): } else if (class_name.ptr() == Symbols::DebugClassName().ptr()) {
Alexander Markov . unresolved

We can recognize expression evaluation class by checking `library.url() == Symbols::EvalSourceUri().ptr()` without depending on the class name. VM didn't look at the class name before, and CFE can freely change it, so the new check looks inconsistent with kernel loader and more fragile than it needs to be.

Also, by checking the library uri only in case of not found class we make sure to avoid overhead of an extra check for every referenced class.

Open in Gerrit

Related details

Attention is currently required from:
  • Tess Strickland
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Id04735059d00d964a8f00885857d3255c18ecf99
Gerrit-Change-Number: 464520
Gerrit-PatchSet: 3
Gerrit-Owner: Tess Strickland <sstr...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Tess Strickland <sstr...@google.com>
Gerrit-Comment-Date: Mon, 01 Dec 2025 15:30:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Alexander Markov (Gerrit)

unread,
Dec 1, 2025, 11:52:02 AM (23 hours ago) Dec 1
to Tess Strickland, Alexander Markov, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Tess Strickland

Alexander Markov added 1 comment

Commit Message
Open in Gerrit

Related details

Attention is currently required from:
  • Tess Strickland
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Id04735059d00d964a8f00885857d3255c18ecf99
Gerrit-Change-Number: 464520
Gerrit-PatchSet: 3
Gerrit-Owner: Tess Strickland <sstr...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Tess Strickland <sstr...@google.com>
Gerrit-Comment-Date: Mon, 01 Dec 2025 16:51:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

Tess Strickland (Gerrit)

unread,
8:10 AM (3 hours ago) 8:10 AM
to Alexander Markov, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Alexander Markov

Tess Strickland voted and added 3 comments

Votes added by Tess Strickland

Auto-Submit+1
Commit-Queue+1

3 comments

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Tess Strickland . resolved

Thanks, Alex! Removing the new symbol invalidated the +1, so PTAL again.

Commit Message
Line 33, Patchset 3:
Alexander Markov . resolved

Nit: `Fixes https://github.com/dart-lang/sdk/issues/61948`

Tess Strickland

Done

File runtime/vm/bytecode_reader.cc
Line 1091, Patchset 3: } else if (class_name.ptr() == Symbols::DebugClassName().ptr()) {
Alexander Markov . resolved

We can recognize expression evaluation class by checking `library.url() == Symbols::EvalSourceUri().ptr()` without depending on the class name. VM didn't look at the class name before, and CFE can freely change it, so the new check looks inconsistent with kernel loader and more fragile than it needs to be.

Also, by checking the library uri only in case of not found class we make sure to avoid overhead of an extra check for every referenced class.

Tess Strickland

Okay, have reverted this part of the change.

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Markov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • 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: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Id04735059d00d964a8f00885857d3255c18ecf99
Gerrit-Change-Number: 464520
Gerrit-PatchSet: 5
Gerrit-Owner: Tess Strickland <sstr...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Alexander Markov <alexm...@google.com>
Gerrit-Comment-Date: Tue, 02 Dec 2025 13:10:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Alexander Markov <alexm...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexander Markov (Gerrit)

unread,
9:33 AM (2 hours ago) 9:33 AM
to Tess Strickland, Alexander Markov, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Tess Strickland

Alexander Markov voted

Code-Review+1
Commit-Queue+2
Open in Gerrit

Related details

Attention is currently required from:
  • Tess Strickland
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Id04735059d00d964a8f00885857d3255c18ecf99
Gerrit-Change-Number: 464520
Gerrit-PatchSet: 6
Gerrit-Owner: Tess Strickland <sstr...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Tess Strickland <sstr...@google.com>
Gerrit-Comment-Date: Tue, 02 Dec 2025 14:33:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
9:33 AM (2 hours ago) 9:33 AM
to Tess Strickland, Alexander Markov, rev...@dartlang.org, vm-...@dartlang.org

Commit Queue submitted the change

Change information

Commit message:
[vm,dyn_modules] Fix evaluation expression function self-reference.

If the evaluation expression function is for an expression in the scope
of a generic function with a parameter whose type includes one of its
type parameters, then the graph for the parameter type will contain a
self reference to the evaluation expression function.

Normally, this self reference would be resolved via the scoped_function_
field. However, while scoped_function_class_ is set to the class containing the expression evaluation function (as expected),
if ReadObject() encounters that class, it returns the "real" class
the evaluation expression should be evaluated in. This means the
self-reference isn't detected.

Add an additional check for the right name/class for the expression
evaluation function.

TEST=pkg/vm_service/test/evaluate_function_type_parameters_test
Cq-Include-Trybots: luci.dart.try:vm-linux-release-x64-try,vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: Id04735059d00d964a8f00885857d3255c18ecf99
Commit-Queue: Alexander Markov <alexm...@google.com>
Reviewed-by: Alexander Markov <alexm...@google.com>
Auto-Submit: Tess Strickland <sstr...@google.com>
Files:
  • M runtime/vm/bytecode_reader.cc
Change size: S
Delta: 1 file changed, 15 insertions(+), 11 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Alexander Markov
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Id04735059d00d964a8f00885857d3255c18ecf99
Gerrit-Change-Number: 464520
Gerrit-PatchSet: 7
Gerrit-Owner: Tess Strickland <sstr...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Tess Strickland <sstr...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages