Project

General

Profile

Actions

Backport #2120

closed

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

Added by ujihisa (Tatsuhiro Ujihisa) over 14 years ago. Updated almost 13 years ago.

Status:
Closed
[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 1 (0 open1 closed)

Is duplicate of Backport191 - Backport #1995: for-in+binding+local_variables = [BUG] Segmentation fault in 1.9.1p243Closedyugui (Yuki Sonoda)08/26/2009Actions
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 14 years ago

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

=begin

=end

Actions #2

Updated by headius (Charles Nutter) over 14 years ago

=begin
Test for this behavior.
=end

Actions #3

Updated by nobu (Nobuyoshi Nakada) over 14 years ago

  • Status changed from Assigned to Closed

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0