[#68478] Looking for MRI projects for Ruby Google Summer of Code 2015 — Tony Arcieri <bascule@...>

Hi ruby-core,

10 messages 2015/03/10

[ruby-core:68673] [Ruby trunk - Bug #11012] [Open] `local_variable_get` crashes on a `Proc` from a method

From: nobu@...
Date: 2015-03-29 02:46:06 UTC
List: ruby-core #68673
Issue #11012 has been reported by Nobuyoshi Nakada.

----------------------------------------
Bug #11012: `local_variable_get` crashes on a `Proc` from a method
https://bugs.ruby-lang.org/issues/11012

* Author: Nobuyoshi Nakada
* Status: Open
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* ruby -v: 50107
* Backport: 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED
----------------------------------------
The following code shows unexpected random object, or segfaults sometimes.

~~~ruby
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")
~~~



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

In This Thread

Prev Next