RFR: 8370500: Change windows x64 implementation of os::current_stack_pointer() [v2]

Erik Österlund eosterlund at openjdk.org
Mon Oct 27 08:53:44 UTC 2025


> The current implementation of os::current_stack_pointer() on windows x64 uses a code stub to read the stack pointer. This means that os::current_stack_pointer() may not be called early on in the bootstrapping. This prevents unhandled oops from being enabled early on.
> 
> However, there is an MSVC intrinsic that provides the same functionality without the need to use stubs: _AddressOfReturnAddress() from intrin.h
> By changing this implementation on windows x64, we should be able to call os::current_stack_pointer() early on as it is seemingly the only implementation with such a bootstrapping dependency.

Erik Österlund has updated the pull request incrementally with one additional commit since the last revision:

  Comment

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/27956/files
  - new: https://git.openjdk.org/jdk/pull/27956/files/be12e6de..168006d8

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=27956&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27956&range=00-01

  Stats: 6 lines in 1 file changed: 6 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/27956.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27956/head:pull/27956

PR: https://git.openjdk.org/jdk/pull/27956


More information about the hotspot-dev mailing list