Skip to content

Commit cfe2a6e

Browse files
committed
Use postponed jobs on Ruby 3.2.0
Otherwise it can cause a VM crash. Won't be a problem in 3.2.1.
1 parent 86b9cc6 commit cfe2a6e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/stackprof.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
if defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled?
88
StackProf.use_postponed_job!
9+
elsif RUBY_VERSION == "3.2.0"
10+
# 3.2.0 crash is the signal is received at the wrong time.
11+
# Fixed in https://github.com/ruby/ruby/pull/7116
12+
# The fix is backported in 3.2.1: https://bugs.ruby-lang.org/issues/19336
13+
StackProf.use_postponed_job!
914
end
1015

1116
module StackProf

0 commit comments

Comments
 (0)