[vm,gardening] Possible fix for build failure on Flutter bots

This is an attempt to fix the following build failure which appears
on Flutter bots but not Dart CI bots:

```
../../../flutter/third_party/dart/runtime/vm/os_win.cc(260,13): error: no matching function for call to 'ReadProcessMemory'
  260 |   BOOL ok = ReadProcessMemory(GetCurrentProcess(), address, buffer,
      |             ^~~~~~~~~~~~~~~~~
../../../flutter/third_party/depot_tools/win_toolchain/vs_files/27370823e7\Windows Kits\10\Include\10.0.22621.0\um\memoryapi.h(152,1): note: candidate function not viable: no known conversion from 'size_t *' (aka 'unsigned int *') to 'SIZE_T *' (aka 'unsigned long *') for 5th argument
  152 | ReadProcessMemory(
      | ^
  153 |     _In_ HANDLE hProcess,
  154 |     _In_ LPCVOID lpBaseAddress,
  155 |     _Out_writes_bytes_to_(nSize,*lpNumberOfBytesRead) LPVOID lpBuffer,
  156 |     _In_ SIZE_T nSize,
  157 |     _Out_opt_ SIZE_T* lpNumberOfBytesRead
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```

TEST=ci

Change-Id: Ic32a5f7750c92850e23c7a8e0e77b1d385e8fc17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511440
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
Alexander Markov
2026-06-11 08:07:37 -07:00
committed by dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent d22b566c31
commit 8e0ba59c7a
+1 -1
View File
@@ -256,7 +256,7 @@ bool OS::SafeReadMemory(void* address,
*error = "ReadProcessMemory not available on UWP";
return false;
#else
size_t bytes_read = 0;
SIZE_T bytes_read = 0;
BOOL ok = ReadProcessMemory(GetCurrentProcess(), address, buffer,
size_in_bytes, &bytes_read);
if (!ok || bytes_read != size_in_bytes) {