RFR: 8263476: NMT: Stack guard pages should not be marked as committed
Johan Sjölen
jsjolen at openjdk.org
Mon Aug 4 12:37:01 UTC 2025
On Thu, 31 Jul 2025 10:36:59 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Use reserved (instead of committed) memory for stack-guard-pages on linux like systems.
>
> `os::must_commit_stack_guard_pages` uses `commit` in its name, but `commit` usually has specific meanings in OS memory context. The actual question the caller is asking is whether the caller needs to do some preparation work before marking the guard-pages as inaccessible. To avoid confusion, I changed it to "allocate". Other suggestions are welcome.
>
> Test: tier1-3
src/hotspot/os/linux/os_linux.cpp line 3455:
> 3453:
> 3454: if (stack_extent < (uintptr_t)addr + size) {
> 3455: ::munmap((void*)stack_extent, (uintptr_t)(addr + size - stack_extent));
Could you explain this, is it fixing a pre-existing bug as well?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26571#discussion_r2251354077
More information about the hotspot-runtime-dev
mailing list