Project

General

Profile

Actions

Bug #19284

closed

Integer overflow when using RUBY_GC_HEAP_INIT_SLOTS environment variable

Added by zeke (Zeke Gabrielse) over 1 year ago. Updated about 1 year ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-darwin19]
[ruby-core:111510]

Description

If you set the environment variable RUBY_GC_HEAP_INIT_SLOTS to anything other than 0, an integer overflow runtime error occurs:

RUBY_GC_HEAP_INIT_SLOTS=10000 ruby -e 'puts "hello, world!"'
# => ruby: integer overflow: 3689348814741910508 * 8 > 18446744073709551615 (RuntimeError)

At this time, I'm not sure if this is platform-specific, but it's failing on Darwin as well as Heroku's environment (Linux).


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #19358: Segfault when setting RUBY_GC_HEAP_INIT_SLOTS to a low valueClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0