[S] Change in dart/sdk[main]: [vm/service]: expose Pointer<T> address in VM Service Protocol

0 views
Skip to first unread message

Nourhan Hasan (Gerrit)

unread,
Mar 9, 2026, 9:09:19 AM (18 hours ago) Mar 9
to Ben Konyi, vm-...@dartlang.org, rev...@dartlang.org

Nourhan Hasan has uploaded the change for review

Commit message

[vm/service]: expose Pointer<T> address in VM Service Protocol

Pointer<T> instances were previously serialized as PlainInstance
with no address, making them opaque to all debugger clients.
Change-Id: Ia44eb0fa0851332409680d8d593141fe25505114

Change information

Files:
  • M pkg/observatory/lib/src/models/objects/instance.dart
  • M pkg/observatory/lib/src/service/object.dart
  • M pkg/vm_service/CHANGELOG.md
  • M pkg/vm_service/java/version.properties
  • M pkg/vm_service/lib/src/vm_service.dart
  • M pkg/vm_service_interface/lib/src/vm_service_interface.dart
  • M runtime/vm/object_service.cc
  • M runtime/vm/service.h
  • M runtime/vm/service/service.md
Change size: S
Delta: 9 files changed, 34 insertions(+), 10 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not 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: newchange
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia44eb0fa0851332409680d8d593141fe25505114
Gerrit-Change-Number: 486460
Gerrit-PatchSet: 1
Gerrit-Owner: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Reviewer: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-CC: Ben Konyi <bko...@google.com>
unsatisfied_requirement
open
diffy

Daco Harkes (Gerrit)

unread,
Mar 9, 2026, 9:18:24 AM (18 hours ago) Mar 9
to Nourhan Hasan, Ben Konyi, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Ben Konyi and Nourhan Hasan

Daco Harkes added 4 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Daco Harkes . unresolved

I don't see any tests.

Does the service protocol have a test suite where we can add a test?

File pkg/observatory/lib/src/models/objects/instance.dart
Line 152, Patchset 1 (Latest): pointer,
Daco Harkes . unresolved

Nit: All the other entries have a comment.

File pkg/vm_service/lib/src/vm_service.dart
Line 2099, Patchset 1 (Parent): // Preserve RPCError exceptions as-is.
Daco Harkes . unresolved

unrelated change?

Line 2577, Patchset 1 (Latest): /// An instance of the dart:ffi Pointer<T> class.
Daco Harkes . unresolved

You might want to add a comment that `T` is erased at runtime.

Open in Gerrit

Related details

Attention is currently required from:
  • Ben Konyi
  • Nourhan Hasan
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not 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: Ia44eb0fa0851332409680d8d593141fe25505114
Gerrit-Change-Number: 486460
Gerrit-PatchSet: 1
Gerrit-Owner: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Reviewer: Ben Konyi <bko...@google.com>
Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Attention: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Attention: Ben Konyi <bko...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 13:18:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Nourhan Hasan (Gerrit)

unread,
Mar 9, 2026, 9:27:17 AM (18 hours ago) Mar 9
to Ben Konyi, Daco Harkes, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Ben Konyi and Daco Harkes

Nourhan Hasan added 1 comment

File pkg/vm_service/lib/src/vm_service.dart
Line 2099, Patchset 1 (Parent): // Preserve RPCError exceptions as-is.
Daco Harkes . unresolved

unrelated change?

Nourhan Hasan

This was removed when I ran: `dart tool/generate.dart`

Open in Gerrit

Related details

Attention is currently required from:
  • Ben Konyi
  • Daco Harkes
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not 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: Ia44eb0fa0851332409680d8d593141fe25505114
Gerrit-Change-Number: 486460
Gerrit-PatchSet: 1
Gerrit-Owner: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Reviewer: Ben Konyi <bko...@google.com>
Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Attention: Ben Konyi <bko...@google.com>
Gerrit-Attention: Daco Harkes <dacoh...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 13:27:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Daco Harkes <dacoh...@google.com>
unsatisfied_requirement
open
diffy

Daco Harkes (Gerrit)

unread,
Mar 9, 2026, 9:30:16 AM (18 hours ago) Mar 9
to Nourhan Hasan, Ben Konyi, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Ben Konyi and Nourhan Hasan

Daco Harkes added 1 comment

File pkg/vm_service/lib/src/vm_service.dart
Line 2099, Patchset 1 (Parent): // Preserve RPCError exceptions as-is.
Daco Harkes . unresolved

unrelated change?

Nourhan Hasan

This was removed when I ran: `dart tool/generate.dart`

Daco Harkes

You can use `git blame` to figure out why changes were made.

It looks like this was a fix recently: https://dart-review.googlesource.com/c/sdk/+/458040

And probably that fix did not run the generator, so the person forgot to run the generator most likely. I think the right thing to do here is to update the generator. (If it's a small fix, can be in this CL. Otherwise, its better as a separate CL.)

Open in Gerrit

Related details

Attention is currently required from:
  • Ben Konyi
  • Nourhan Hasan
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not 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: Ia44eb0fa0851332409680d8d593141fe25505114
Gerrit-Change-Number: 486460
Gerrit-PatchSet: 1
Gerrit-Owner: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Reviewer: Ben Konyi <bko...@google.com>
Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Attention: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Attention: Ben Konyi <bko...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 13:30:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nourhan Hasan <nourhan...@gmail.com>
Comment-In-Reply-To: Daco Harkes <dacoh...@google.com>
unsatisfied_requirement
open
diffy

Nourhan Hasan (Gerrit)

unread,
Mar 9, 2026, 9:30:53 AM (18 hours ago) Mar 9
to Ben Konyi, Daco Harkes, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Ben Konyi and Nourhan Hasan

Nourhan Hasan added 1 comment

Patchset-level comments
Daco Harkes . unresolved

I don't see any tests.

Does the service protocol have a test suite where we can add a test?

Nourhan Hasan

This is the file: pkg/vm_service/test/get_object_rpc_test.dart

I will add tests here.

Open in Gerrit

Related details

Attention is currently required from:
  • Ben Konyi
  • Nourhan Hasan
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not 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: Ia44eb0fa0851332409680d8d593141fe25505114
Gerrit-Change-Number: 486460
Gerrit-PatchSet: 1
Gerrit-Owner: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Reviewer: Ben Konyi <bko...@google.com>
Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Attention: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Attention: Ben Konyi <bko...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 13:30:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Daco Harkes <dacoh...@google.com>
unsatisfied_requirement
open
diffy

Nourhan Hasan (Gerrit)

unread,
Mar 9, 2026, 9:38:11 AM (17 hours ago) Mar 9
to Ben Konyi, Daco Harkes, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Ben Konyi and Daco Harkes

Nourhan Hasan added 1 comment

File pkg/vm_service/lib/src/vm_service.dart
Line 2099, Patchset 1 (Parent): // Preserve RPCError exceptions as-is.
Daco Harkes . unresolved

unrelated change?

Nourhan Hasan

This was removed when I ran: `dart tool/generate.dart`

Daco Harkes

You can use `git blame` to figure out why changes were made.

It looks like this was a fix recently: https://dart-review.googlesource.com/c/sdk/+/458040

And probably that fix did not run the generator, so the person forgot to run the generator most likely. I think the right thing to do here is to update the generator. (If it's a small fix, can be in this CL. Otherwise, its better as a separate CL.)

Nourhan Hasan

Thanks for the explanation. I will work on it.

Open in Gerrit

Related details

Attention is currently required from:
  • Ben Konyi
  • Daco Harkes
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not 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: Ia44eb0fa0851332409680d8d593141fe25505114
Gerrit-Change-Number: 486460
Gerrit-PatchSet: 1
Gerrit-Owner: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Reviewer: Ben Konyi <bko...@google.com>
Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Attention: Ben Konyi <bko...@google.com>
Gerrit-Attention: Daco Harkes <dacoh...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 13:38:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Ben Konyi (Gerrit)

unread,
Mar 9, 2026, 1:08:36 PM (14 hours ago) Mar 9
to Nourhan Hasan, Daco Harkes, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Daco Harkes and Nourhan Hasan

Ben Konyi added 3 comments

File pkg/vm_service/lib/src/vm_service.dart
Line 2577, Patchset 1 (Latest): /// An instance of the dart:ffi Pointer<T> class.
Daco Harkes . unresolved

You might want to add a comment that `T` is erased at runtime.

Ben Konyi

Is it even worth mentioning the type argument?

File runtime/vm/object_service.cc
Line 1873, Patchset 1 (Latest): const TypeArguments& type_args =
Ben Konyi . unresolved

As Daco mentioned, the type arguments are erased for pointers. I think we should just remove this.

File runtime/vm/service/service.md
Line 3475, Patchset 1 (Latest): // Pointer
Ben Konyi . unresolved

I'd remove this.

Open in Gerrit

Related details

Attention is currently required from:
  • Daco Harkes
  • Nourhan Hasan
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not 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: Ia44eb0fa0851332409680d8d593141fe25505114
Gerrit-Change-Number: 486460
Gerrit-PatchSet: 1
Gerrit-Owner: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Reviewer: Ben Konyi <bko...@google.com>
Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Attention: Nourhan Hasan <nourhan...@gmail.com>
Gerrit-Attention: Daco Harkes <dacoh...@google.com>
Gerrit-Comment-Date: Mon, 09 Mar 2026 17:08:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Daco Harkes <dacoh...@google.com>
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages