Project

General

Profile

Actions

Bug #9454

closed

The define_method(:class) segfault

Added by kyrylo (Kyrylo Silin) almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
[ruby-core:60113]

Description

Ruby 2.1.0p0 segfaults when I invoke the following code.

define_method(:class) { self.class }
self.class #=> segfault :(

It affects exclusively Ruby 2.1.0p0 (I also tested on the most recent 2.0.0, 1.9.3 and 1.8.7).

By the way, on the contrary, the following code does not segfault.

def self.class; self.class end
self.class #=> SystemStackError

Viva la Ucraino revolución!


Files

bug9454.txt (625 KB) bug9454.txt kyrylo (Kyrylo Silin), 01/26/2014 07:25 PM

Related issues 5 (0 open5 closed)

Related to Ruby master - Bug #14387: Ruby 2.5 を Alpine Linux で実行すると比較的浅めで SystemStackError 例外になるClosedActions
Has duplicate Backport21 - Backport #9828: Segfault instead of stack overflowClosed05/11/2014Actions
Has duplicate Ruby master - Bug #9945: Segmentation fault when defining recursive methodClosed06/14/2014Actions
Has duplicate Ruby master - Bug #10218: 手続きを再帰するとSegmentation faultが発生するClosed09/09/2014Actions
Has duplicate Ruby master - Bug #10955: invoke_block_from_c segfaultClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0