Skip to content

Commit c1f12ca

Browse files
committed
Mark frames_buffer
Objects in frames_buffer may not have been placed the frames ST table and may not be held on by Ruby meaning it could get garbage collected.
1 parent f27ee5b commit c1f12ca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/stackprof/stackprof.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,10 @@ stackprof_gc_mark(void *data)
811811

812812
if (_stackprof.frames)
813813
st_foreach(_stackprof.frames, frame_mark_i, 0);
814+
815+
for (int i = 0; i < _stackprof.buffer_count; i++) {
816+
rb_gc_mark(_stackprof.frames_buffer[i]);
817+
}
814818
}
815819

816820
static void

0 commit comments

Comments
 (0)