skip SystemStackError

with -O0 build, prism parser consumes a lot of machine stack and
it doesn't work with minimum machine stack for threads, which
specified with `RUBY_THREAD_MACHINE_STACK_SIZE=1`.

So simply ignore `SystemStackError` for btest.
This commit is contained in:
Koichi Sasada 2024-11-06 16:04:35 +09:00
parent 97aaf6f760
commit 78064d0770
Notes: git 2024-11-08 09:03:06 +00:00

View File

@ -1838,8 +1838,13 @@ assert_equal 'true', %q{
end
Ractor.new{
require 'benchmark'
Benchmark.measure{}
begin
require 'benchmark'
Benchmark.measure{}
rescue SystemStackError
# prism parser with -O0 build consumes a lot of machine stack
Data.define(:real).new(1)
end
}.take.real > 0
}
@ -1883,7 +1888,12 @@ assert_equal 'true', %q{
autoload :Benchmark, 'benchmark'
r = Ractor.new do
Benchmark.measure{}
begin
Benchmark.measure{}
rescue SystemStackError
# prism parser with -O0 build consumes a lot of machine stack
Data.define(:real).new(1)
end
end
r.take.real > 0
}