Project

General

Profile

Bug #20250 » crash_test_2.rb

reproduction - zetter (Chris Zetter), 02/09/2024 10:10 AM

 

require 'bundler/inline'

gemfile(true) do
source 'https://rubygems.org'
gem 'activesupport', '7.1.3'
end

require 'active_support'

logger = ActiveSupport::Logger.new('log/log.log', 1, 100 * 1024 * 1024)

logger.formatter = proc {|_, _, _, message| "#{message}\n" }

logger = ActiveSupport::TaggedLogging.new(logger)

logger.tagged("TAG").info "hello"
logger.tagged("TAG").info "hello" # usually crashes here
GC.start # sometimes need to trigger crash with GC
(3-3/3)