diff options
| author | Koichi Sasada <ko1@atdot.net> | 2024-11-06 16:04:35 +0900 |
|---|---|---|
| committer | Koichi Sasada <ko1@atdot.net> | 2024-11-08 18:02:46 +0900 |
| commit | 78064d0770c40af89f9a57eb111a27fba00b2ec8 (patch) | |
| tree | 6f40f6f82b85558a8397c9dcb6b8c92e364ce82e | |
| parent | 97aaf6f760259c639dc3ceb3a80fe82411649569 (diff) | |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11142
| -rw-r--r-- | bootstraptest/test_ractor.rb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index f2ed9de08f..4c6e2d576f 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -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 } |
