From dff2b675db51ed529f05fd7e2964f31ca0de98b0 Mon Sep 17 00:00:00 2001 From: Archkon <180910180+Archkon@users.noreply.github.com> Date: Fri, 7 Aug 2026 15:32:48 +0800 Subject: [PATCH] process: validate resource stats array offsets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Reviewed-By: Aviv Keller --- src/node_process_methods.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc index 4a258e5f140..a33748d360c 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc @@ -107,6 +107,7 @@ inline Local get_fields_array_buffer( CHECK(args[index]->IsFloat64Array()); Local arr = args[index].As(); CHECK_EQ(arr->Length(), array_length); + CHECK_EQ(arr->ByteOffset(), 0); return arr->Buffer(); }