Skip to content

Commit 1a5fa06

Browse files
committed
komment
1 parent 4bde281 commit 1a5fa06

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎Modules/_remote_debugging/frame_cache.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,8 @@ frame_cache_store(
318318
// Validate we have a complete stack before caching.
319319
// Only cache if last_frame_visited matches base_frame_addr (the sentinel
320320
// at the bottom of the stack). Note: we use last_frame_visited rather than
321-
// addrs[num_addrs-1] because the base frame is visited but not added to the
322-
// addrs array (it returns frame==NULL from is_frame_valid due to
323-
// owner==FRAME_OWNED_BY_INTERPRETER).
321+
// addrs[num_addrs-1] because the base frame's address is not added to the
322+
// addrs array.
324323
if (base_frame_addr != 0 && last_frame_visited != base_frame_addr) {
325324
// Incomplete stack - don't cache (graceful degradation)
326325
return 0;

‎Modules/_remote_debugging/frames.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,9 @@ process_frame_chain(
326326
}
327327
assert(frame_count <= MAX_FRAME_CHAIN_DEPTH);
328328

329+
// The base frame is a sentinel with previous == NULL: reaching it is
330+
// enough, no need to read it. Still read it when it is the GC frame
331+
// so the <GC> marker gets emitted.
329332
if (frame_addr == ctx->base_frame_addr
330333
&& !(unwinder->gc && frame_addr == ctx->gc_frame)) {
331334
break;

0 commit comments

Comments
 (0)