Project

General

Profile

« Previous | Next » 

Revision b28f3443

Added by jhawthorn (John Hawthorn) about 1 month ago

Use a T_DATA for cross_ractor_require

[Bug #21090]

The struct was previously allocated on the stack, which could be freed
if the Thread is terminated. Moving this to a T_DATA on the heap should
mean this is no longer an issue.

1000.times { Ractor.new { th = Thread.new { require "rbconfig" }; Thread.pass }.take }

Co-authored-by: Luke Gruber