Project

General

Profile

Actions

Bug #11012

closed

`local_variable_get` crashes on a `Proc` from a method

Added by nobu (Nobuyoshi Nakada) about 9 years ago. Updated about 9 years ago.

Status:
Closed
Target version:
-
[ruby-core:<unknown>]

Description

The following code shows unexpected random object, or segfaults sometimes.

class << (obj = Object.new)
  src = 1000.times.map {|i|"v#{i} = "}.join("")
  eval("def foo()\n""#{src}nil\n""end")
end

b = obj.method(:foo).to_proc.binding
p b.local_variable_get("v999")
Actions

Also available in: Atom PDF

Like0
Like0Like0