diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2022-12-29 20:27:09 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2022-12-30 09:01:50 -0500 |
| commit | 90a80eb076429978e720e11fb17a3cbb96de3454 (patch) | |
| tree | 614aacc27bdf773b4494d286836805c932a13079 /test | |
| parent | 36c4dda738bc865af681049209fb6a1eb1ae3f49 (diff) | |
Fix integer underflow when using HEAP_INIT_SLOTS
There is an integer underflow when the environment variable
RUBY_GC_HEAP_INIT_SLOTS is less than the number of slots currently
in the Ruby heap.
[Bug #19284]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7044
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_gc.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 937f303604..5df3bba5f9 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -305,6 +305,11 @@ class TestGc < Test::Unit::TestCase def test_gc_parameter env = { + "RUBY_GC_HEAP_INIT_SLOTS" => "100" + } + assert_in_out_err([env, "-e", "exit"], "", [], [], "[Bug #19284]") + + env = { "RUBY_GC_MALLOC_LIMIT" => "60000000", "RUBY_GC_HEAP_INIT_SLOTS" => "100000" } |
