Project

General

Profile

Backport #2120

Kernel.eval("local_variables", binding) in for SEGV in 1.9.1

Added by ujihisa (Tatsuhiro Ujihisa) over 9 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:25641]

Description

=begin
Howard Yeh showed that the following code causes SEGV in [ruby-core:25634] in ruby 1.9.1 (not in 1.9.2dev):

for i in 1..100
a = 1
p Kernel.eval("local_variables",binding)
break
end

The minimum bug reproduction code is

for i in [1]
p eval('local_variables', binding)
end

The attached patch solves this problem.
=end


Files

local_variables_in_for_binding_segv.patch (359 Bytes) local_variables_in_for_binding_segv.patch ujihisa (Tatsuhiro Ujihisa), 09/19/2009 08:07 AM
ruby-2120.patch (520 Bytes) ruby-2120.patch headius (Charles Nutter), 09/19/2009 05:14 PM

Related issues

Is duplicate of Backport191 - Backport #1995: for-in+binding+local_variables = [BUG] Segmentation fault in 1.9.1p243Closed08/26/2009Actions

History

#1

Updated by nobu (Nobuyoshi Nakada) over 9 years ago

  • Status changed from Open to Assigned
  • Assignee set to yugui (Yuki Sonoda)

=begin

=end

#2

Updated by headius (Charles Nutter) over 9 years ago

=begin
Test for this behavior.
=end

#3

Updated by nobu (Nobuyoshi Nakada) over 9 years ago

  • Status changed from Assigned to Closed

=begin
Dup of #1995. Already fixed.
=end

Also available in: Atom PDF