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

David Holmes dholmes at openjdk.org
Wed Aug 6 02:09:03 UTC 2025


On Tue, 5 Aug 2025 18:00:34 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review
>
> src/hotspot/os/linux/os_linux.cpp line 3478:
> 
>> 3476:       ::munmap((void*)stack_extent, (uintptr_t)(addr + size - stack_extent));
>> 3477:     }
>> 3478:     return os::pd_attempt_reserve_memory_at(addr, size, !ExecMem) != nullptr;
> 
> This patch indeed goes beyond my original intention. IIRC,  my intention was to replace `os::commit()` with `::mprotect()` to set protection on stack guard pages.

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

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

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


More information about the hotspot-runtime-dev mailing list