On Thu, 5 Mar 2026 01:50:29 GMT, Yasumasa Suenaga <[email protected]> wrote:
>> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update test/hotspot/jtreg/gtest/NativeStackOverflowGtest.java >> >> Co-authored-by: David Holmes >> <[email protected]> > > src/hotspot/share/utilities/vmError.cpp line 2186: > >> 2184: } // end: crash_with_segfault >> 2185: PRAGMA_DIAG_POP >> 2186: > > The code would be more simple if we can use `alloca()` here. Maybe. But I am not sure if that would have the same effect. Just calling alloca might cause the frame to expand beyond the trailing guard page(s) into potentially writable memory below them. In order to trigger the overflow, one would have to carefully, downward, from hthe ighest to the lowest address - touch the allocated array to step into the guard page "from the right direction". In addition, the libc may actually be too smart for this and detect a stack overflow right in the call to alloca. Plus, I wanted to see that callstacks are printed correctly in the hs-err file. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29559#discussion_r2981867276
