Project

General

Profile

Actions

Bug #18343

closed

empty hash passed to Array#pack causes Segmentation fault (2.6)

Added by Ethan (Ethan -) over 2 years ago. Updated over 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.8p205 (2021-07-07 revision 67951) [x86_64-linux]
[ruby-core:106096]

Description

passing an empty hash to Array#pack segfaults from ruby 2.4 to ruby 2.6 on ubuntu, macos, and windows.

[0].pack('c', {})

pack takes a keyword argument, and handles unknown keywords, but the empty hash segfaults.

here is the error trace in a github workflow running only the above expression: https://github.com/notEthan/jsi/runs/4226433638 (other ruby versions and OSes are part of the same run)

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0