[vm-service] Make sure socket IDs are unique in SocketProfile #49111
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
pkg-vm-service
SocketStatistic
, which is a part ofSocketProfile
returned bygetSocketProfile
vm-service API describes socket id in the following way (https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service_extension.md#socketstatistic):However, the implementation uses address of
Socket
C++ objects as those ids. Those objects can be freed and newSocket
objects could be allocated at the same addresses, making those ids non-unique.(This actually happens with new async/await implementation on
service_2/network_profiling_test
as async functions no longer capture everything in the context and socket objects can be garbage-collected earlier.)@bkonyi
The text was updated successfully, but these errors were encountered: