Bug #871

Segfault when define_method is setting up a method that takes a block

Added by csirac2 (Paul Harvey) over 3 years ago. Updated about 1 year ago.

[ruby-core:20544]
Status:Closed Start date:12/14/2008
Priority:High Due date:
Assignee:ko1 (Koichi Sasada) % Done:

100%

Category:-
Target version:1.9.1 Release Candidate
ruby -v:

Description

I'm getting back in to Ruby and decided to work with 1.9.

At http://www.infoq.com/news/2008/01/new-lambda-syntax I was looking at some changes since 1.8 regarding lambdas.

The example code there works fine on Ruby 1.8 but segfaults Debian's packaged version of Ruby 1.9 (1.9.0+20060609-1etch3), and also ruby-1.9.1-preview2 that I just compiled and tested (using --prefix=/usr/local).

I'm running Debian Etch on intel hardware.

I set the priority to High only because this bug produces a segfault, not because it actually impacts me in any important way.

See attached test code and shell session.

Thanks

test.rb - Test code that works on Ruby 1.8, segfaults on 1.9.1-p2 (312 Bytes) csirac2 (Paul Harvey), 12/14/2008 03:41 pm

shell_session.txt - Shell session showing segfault and backtrace. (1.8 kB) csirac2 (Paul Harvey), 12/14/2008 03:41 pm

Associated revisions

Revision 20748
Added by nobu (Nobuyoshi Nakada) over 3 years ago

* vm_insnhelper.c (vm_callee_setup_arg_complex): uses cfp from blockptr instead of the current cfp. [ruby-core:20544]

History

Updated by yugui (Yuki Sonoda) over 3 years ago

  • Assignee set to ko1 (Koichi Sasada)
  • Target version set to 1.9.1 Release Candidate

Updated by nobu (Nobuyoshi Nakada) over 3 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100
Applied in changeset r20748.

Also available in: Atom PDF