Project

General

Profile

Actions

Bug #15536

closed

Crash on merging specific hashes using keyword splat

Added by decuplet (Nikita Shilnikov) over 5 years ago. Updated about 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
[ruby-core:91095]

Description

Here's a snippet that leads to a crash on ruby 2.5.3. I tried to make it as small as possible.

1000.times do
  {
    **{
      a1: nil,
      a2: nil,
      a3: nil,
      a4: nil,
      a5: nil,
      a6: nil,
      a7: nil,
      a8: nil,
      a9: nil
    },
    b1: nil,
    b2: nil,
    a4: nil,
    **{ c1: nil, c2: nil },
    a7: nil,
    a8: nil,
    a9: nil,
  }
end

Results in *** Error in irb': malloc(): memory corruption: 0x000055ca6c832bd0 *** (more detail in the attached file).

We came across this on ruby 2.5.3 and as far as I can tell it's no longer a problem on 2.6 but we yet to upgrade.


Files

segfault.txt (30.8 KB) segfault.txt decuplet (Nikita Shilnikov), 01/15/2019 08:37 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0