RFR: 8325153: SEGV in stackChunkOopDesc::derelativize_address(int)

Coleen Phillimore coleenp at openjdk.org
Wed Feb 21 22:20:55 UTC 2024


On Wed, 21 Feb 2024 09:21:11 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:

> The JVM used to SEGV when running jdk/internal/vm/Continuation/Fuzz.java with '-Xlog:all=trace:file=hotspot.%p.log'
> 
> The problem was this line in StackWalk::fetchNextBatch() at src/hotspot/share/prims/stackwalk.cpp:547:
> 
> log_debug(stackwalk)("advanced past %s", stream.method()->external_name());
> 
> It is not always safe to dig out the name of the last frame here. The second batch is allocated on top of the first batch, so there is no crash when we dig out the last name from the first batch. However the third batch, is allocated on the same stack level as the second, which means that the second batch has been reclaimed. Thus trying to reach into the second batch when processing the third will cause a segmentation violation.
> 
> Now passes:
> jdk/internal/vm/Continuation/Fuzz.java with '-Xlog:all=trace:file=hotspot.%p.log'
> As well as tier1-tier5

I'll sponsor it tomorrow when you can watch it.

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

PR Comment: https://git.openjdk.org/jdk/pull/17942#issuecomment-1958119371


More information about the hotspot-dev mailing list