Integrated: 8325153: SEGV in stackChunkOopDesc::derelativize_address(int)
Fredrik Bredberg
fbredberg at openjdk.org
Thu Feb 22 13:10:05 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
This pull request has now been integrated.
Changeset: f365d807
Author: Fredrik Bredberg <fbredberg at openjdk.org>
Committer: Coleen Phillimore <coleenp at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/f365d807e5552a6ad9a36afd82db8f0881d62cc3
Stats: 6 lines in 1 file changed: 4 ins; 0 del; 2 mod
8325153: SEGV in stackChunkOopDesc::derelativize_address(int)
Reviewed-by: stefank, coleenp
-------------
PR: https://git.openjdk.org/jdk/pull/17942
More information about the hotspot-dev
mailing list