RFR: 8263476: Use reserved memory for stack guard pages [v3]

Zhengyu Gu zgu at openjdk.org
Wed Aug 6 14:33:04 UTC 2025


On Wed, 6 Aug 2025 08:53:31 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> @zhengyu123 I don't understand your comment - we already do use `mprotect` on the (committed) stack guard pages. ??
>
> I am confused, too.

Sorry for the confusion. 

Current `create_stack_guard_pages()` implementation calls `os::commit_memory(addr, size, !ExecMem)` to setup the protection. The side-effect of the call introduced the problem I initially reported. What I mean in previous comment is to bypass `os::commit_memory()` call and call `::mprotect` to setup the protection, so that NMT won't record stack guard pages as `committed`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26571#discussion_r2257382029


More information about the hotspot-runtime-dev mailing list