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

Stefan Karlsson stefank at openjdk.org
Wed Feb 21 14:08: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 resource 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 resource 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

Marked as reviewed by stefank (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/17942#pullrequestreview-1893302794


More information about the hotspot-dev mailing list