On Mon, 19 Oct 2026 22:38:58 GMT, Xin Liu <[email protected]> wrote: >> Andrei Pangin has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains two additional >> commits since the last revision: >> >> - Re-implemented native frames support using variable-size requests >> - 8392187: JFR: Use-after-free bug in CPU-time profiler can crash JVM > > src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp line 609: > >> 607: u4 JfrCPUSamplerThread::walk_native_stack(const void* ucontext, >> JavaThread* jt, address* pcs) { >> 608: frame f = os::fetch_frame_from_context(ucontext); >> 609: const intptr_t* const last_java_sp = jt->last_Java_sp(); > > Should we assert(jt->has_last_Java_frame) beforehand? > > It's very important that the loop terminates at the boundary (LJF).
No, `last_java_sp` can be `nullptr` and this is totally fine. E.g. a JVM TI thread (started by `RunAgentThread`) can have no Java frames at all. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32524#discussion_r4320642557
