ruby-core

Mailing list archive

[ruby-core:76795] [Ruby trunk Bug#12662][Rejected] rb_hash_fetch() Segmentation fault on an empty hash table

From: nobu@...
Date: 2016-08-09 14:51:23 UTC
List: ruby-core #76795
Issue #12662 has been updated by Nobuyoshi Nakada.

Status changed from Open to Rejected

It's your bug.
`rb_hash_fetch()` raises an exception if the key is not found, and you must catch it by `rb_protect()`.

----------------------------------------
Bug #12662: rb_hash_fetch() Segmentation fault on an empty hash table
https://bugs.ruby-lang.org/issues/12662#change-60018

* Author: Rocco Carbone
* Status: Rejected
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
I am writing HTM (Hash Table Machine - a C benchmark program for hash table) and libruby aborts with

ruby: [BUG] Segmentation fault at 0x00000000000018
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]

while attempting to get an entry from an empty hash table.

Attached is a simple program that reproduces the bug.

Hope it helps.

ciao

/rocco

---Files--------------------------------
ruby-bug.c (652 Bytes)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next