Commit 39d3b1d1a09 for nodejs

commit 39d3b1d1a09fe363bf7497ec917d8dc5880e8f89
Author: Shelley Vohr <shelley.vohr@gmail.com>
Date:   Sun Sep 6 18:57:56 2026 +0000

    deps: V8: cherry-pick 5404e0f85a83

    Original commit message:

        [cppgc] Use _AddressOfReturnAddress() for StackStartMarker under MSVC

        include/cppgc/heap.h is a public header, and since b3cb54c7e65
        ("[heap] Add StackStartMarker for cppgc") it calls
        __builtin_frame_address(0) unconditionally. That builtin does not exist
        in MSVC, so any translation unit built with cl.exe that includes the
        header (directly or through v8-cppgc.h) fails to compile, even if it
        never constructs a StackStartMarker.

        Use _AddressOfReturnAddress() when V8_CC_MSVC is set, which is what
        base::Stack::GetCurrentStackPosition() already does for the same
        purpose, and keep __builtin_frame_address(0) elsewhere.

        Bug: none
        Change-Id: Icd4c0238cb277c8e1b73454534ffb2519b302ce9
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8361192
        Reviewed-by: Omer Katz <omerkatz@chromium.org>
        Reviewed-by: Camillo Bruni <cbruni@chromium.org>
        Commit-Queue: Shelley Vohr <shelley.vohr@gmail.com>
        Cr-Commit-Position: refs/heads/main@{#109737}

    Refs: https://github.com/v8/v8/commit/5404e0f85a8313b0ef8342d3081c008714b7fdb9
    Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
    PR-URL: https://github.com/nodejs/node/pull/65161
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Richard Lau <richard.lau@ibm.com>

diff --git a/common.gypi b/common.gypi
index 162e549e980..88e26799d8b 100644
--- a/common.gypi
+++ b/common.gypi
@@ -44,7 +44,7 @@

     # Reset this number to 0 on major V8 upgrades.
     # Increment by one for each non-official patch applied to deps/v8.
-    'v8_embedder_string': '-node.17',
+    'v8_embedder_string': '-node.18',

     ##### V8 defaults for Node.js #####

diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS
index 331de3a3923..0b440374225 100644
--- a/deps/v8/AUTHORS
+++ b/deps/v8/AUTHORS
@@ -295,6 +295,7 @@ Seo Sanghyeon <sanxiyn@gmail.com>
 Sergey Markelov <sergionso@gmail.com>
 Shawn Anastasio <shawnanastasio@gmail.com>
 Shawn Presser <shawnpresser@gmail.com>
+Shelley Vohr <shelley.vohr@gmail.com>
 Sho Miyamoto <me@shqld.dev>
 Shumaf Lovpache <soarex16@gmail.com>
 Stefan Penner <stefan.penner@gmail.com>
diff --git a/deps/v8/include/cppgc/heap.h b/deps/v8/include/cppgc/heap.h
index 2968a0af197..77673be7d73 100644
--- a/deps/v8/include/cppgc/heap.h
+++ b/deps/v8/include/cppgc/heap.h
@@ -15,6 +15,10 @@
 #include "cppgc/platform.h"
 #include "v8config.h"  // NOLINT(build/include_directory)

+#if V8_CC_MSVC
+#include <intrin.h>  // _AddressOfReturnAddress()
+#endif
+
 /**
  * cppgc - A C++ garbage collection library.
  */
@@ -37,7 +41,11 @@ class Heap;
  */
 class V8_EXPORT StackStartMarker {
  public:
+#if V8_CC_MSVC
+  StackStartMarker() : stack_start_(_AddressOfReturnAddress()) {}
+#else
   StackStartMarker() : stack_start_(__builtin_frame_address(0)) {}
+#endif
   void* stack_start() const { return stack_start_; }

  private: