Project

General

Profile

Actions

Bug #11954

closed

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

Added by schnittchen (Thomas Stratmann) over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
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 schnittchen (Thomas Stratmann), 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) over 6 years ago

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) over 6 years ago

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) about 6 years ago

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) about 6 years ago

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) about 6 years ago

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

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

Actions #6

Updated by shugo (Shugo Maeda) about 6 years ago

  • 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) about 6 years ago

  • 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) almost 6 years ago

  • 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: Atom PDF