Skip to content

Don't use numbers larger than will fit into double-precision floating points in the VM Service for identifiers #53081

Closed
@DanTup

Description

@DanTup

The VM Service currently generates random 64bit integers for things like Isolate.number. Some clients (such as JS and Lua) store numbers as double-precision floating point numbers with a max value of 2^53:

https://api.dart.dev/stable/3.0.7/dart-core/int-class.html#:~:text=When%20compiling%20to%20JavaScript

To avoid compatibility issues, it would be better if the VM Service didn't use numbers above 2^53 for these randomly assigned identifiers.

Although in some cases there are string versions of these identifiers, for convenience of clients using both DAP and the VM Service at the same time, we use the Isolate.number in DAP's threadID (which is an integer and we cannot change) so the strings do not help.

(FYI @bkonyi @christopherfujino)

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failuresarea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.vm-serviceThe VM Service Protocol, both the specification and its implementation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions