Issue #12565 has been updated by Shugo Maeda.

Assignee set to Nobuyoshi Nakada
Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED

@nobu Please fix it if you come up with a better solution.
It seems that Ruby 2.2 or earlier doesn't have this problem.


----------------------------------------
Bug #12565: SEGV when using &:foo with tail call optimization
https://bugs.ruby-lang.org/issues/12565#change-59533

* Author: Shugo Maeda
* Status: Closed
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* ruby -v: 
* Backport: 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED
----------------------------------------
The following script causes SEGV:

```ruby
RubyVM::InstructionSequence.compile_option = {
  :tailcall_optimization => true,
  :trace_instruction => false
}

eval(<<EOF)
def foo(&block)
  yield(1, 2)
end

def bar
  foo(&:*)
end

p bar
EOF
```



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

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>