process: validate resource stats array offsets

Assert that the internally allocated Float64Array views used by CPU,
thread CPU, memory, and resource statistics have zero byte offsets.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/65098
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Aviv Keller <me@aviv.sh>
This commit is contained in:
Archkon authored and Antoine du Hamel committed 2026-08-27 14:00:33 +02:00
1 parent e624785846
commit dff2b675db
1 file changed
+1
+1
View File
@@ -107,6 +107,7 @@ inline Local<ArrayBuffer> get_fields_array_buffer(
CHECK(args[index]->IsFloat64Array());
Local<Float64Array> arr = args[index].As<Float64Array>();
CHECK_EQ(arr->Length(), array_length);
CHECK_EQ(arr->ByteOffset(), 0);
return arr->Buffer();
}