Project

General

Profile

Actions

Bug #11954

closed

"self has wrong type to call super in this context" under weird circumstances

Bug #11954: "self has wrong type to call super in this context" under weird circumstances

Added by Anonymous about 10 years ago. Updated over 9 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
[ruby-core:72724]

Description

See attached file snafu.rb.

This file was obtained by inlining and reducing a large codebase...


Files

snafu.rb (1.56 KB) snafu.rb Anonymous, 01/05/2016 08:28 PM
invoke_bmethod.diff (2.8 KB) invoke_bmethod.diff shugo (Shugo Maeda), 01/08/2016 01:46 AM

Updated by splattael (Peter Leitzen) about 10 years ago Actions #1 [ruby-core:72765]

I can reproduce this bug on 2.3.0 and was able to reduce the broken code even more increasing the amount of iterations:

https://gist.github.com/splattael/7b45e0f16e0084f50668

Updated by shugo (Shugo Maeda) about 10 years ago Actions #2 [ruby-core:72771]

The bug was introduced in r52104 by ko1, and it seems to be fixed by the attached patch, but Im' not sure.

Updated by ko1 (Koichi Sasada) almost 10 years ago Actions #3 [ruby-core:74875]

Shugo-san, thank you for your investigating.
It seems perfect.
Could you commit it? or should I commit it?

Thanks,
Koichi

Updated by fcheung (Frederick Cheung) over 9 years ago Actions #4 [ruby-core:76021]

Koichi Sasada wrote:

Shugo-san, thank you for your investigating.
It seems perfect.
Could you commit it? or should I commit it?

Was this ever committed/backported ? I've encountered this in real world usage with 2.3.1, and Peter's reproduction script continues to show the issue (although I had to increase iteration count to get consistent failure)

Updated by shugo (Shugo Maeda) over 9 years ago Actions #5 [ruby-core:76079]

  • Assignee changed from ko1 (Koichi Sasada) to shugo (Shugo Maeda)

I missed ko1's comment. I'll commit it later.

Updated by shugo (Shugo Maeda) over 9 years ago Actions #6

  • Status changed from Assigned to Closed

Applied in changeset r55462.


  • vm.c (invoke_bmethod, invoke_block_from_c_0): revert r52104
    partially to avoid "self has wrong type to call super in this
    context" errors.
    [ruby-core:72724] [Bug #11954]

Updated by shugo (Shugo Maeda) over 9 years ago Actions #7 [ruby-core:76080]

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED

Updated by nagachika (Tomoyuki Chikanaga) over 9 years ago Actions #8 [ruby-core:76216]

  • Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE

ruby_2_3 r55560 merged revision(s) 55462.

Actions

Also available in: PDF Atom