Skip to content

Commit 3e0eea6

Browse files
committed
Don't set RUBY_TYPED_EMBEDDABLE flag on backtrace
1 parent 4bdb796 commit 3e0eea6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vm_backtrace.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,10 @@ static const rb_data_type_t backtrace_data_type = {
540540
NULL, // No external memory to report,
541541
backtrace_update,
542542
},
543-
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_EMBEDDABLE
543+
/* Cannot set the RUBY_TYPED_EMBEDDABLE flag because the loc of frame_info
544+
* points elements in the backtrace array. This can cause the loc to become
545+
* incorrect if this backtrace object is moved by compaction. */
546+
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
544547
};
545548

546549
int

0 commit comments

Comments
 (0)