Project

General

Profile

Actions

Bug #20344

open

argument stack underflow (-1)

Added by nobu (Nobuyoshi Nakada) about 1 month ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:117210]

Description

This file produces argument stack underflow, since ruby 2.5.

proc do
  next if true

  case nil
  when "a"
    next
  when "b"
  when "c"
    proc {}
  end

  next unless true
end
-- raw disasm--------
   trace: 100
   0000 nop                                                              (   1)
 <L000> [sp: 0, unremovable: 1, refcnt: 5]
   trace: 1
 <L004> [sp: 0, unremovable: 0, refcnt: 1]
   adjust: [label: 0]
   0001 putnil                                                           (   2)
   0002 leave                                                            (  13)
 <L008> [sp: 1, unremovable: 0, refcnt: 1]
   adjust: [label: 0]
   0003 putnil                                                           (   6)
   0004 leave                                                            (  13)
   adjust: [label: 8]
   0005 jump                 <L005>                                      (   5)
   0007 pop                                                              (   7)
   0008 jump                 <L005>                                      (   7)
*  0010 pop                                                              (   8)
   trace: 1
 <L011> [sp: -1, unremovable: 1, refcnt: 1]
   0011 putself                                                          (   9)
   0012 send                 <calldata:proc, 0>, nil                     (   9)
 <L012> [sp: -1, unremovable: 0, refcnt: 2]
   0015 pop                                                              (   9)
 <L005> [sp: 1, unremovable: 0, refcnt: 2]
   trace: 1
   0016 putnil                                                           (  12)
 <L001> [sp: -1, unremovable: 0, refcnt: 3]
   trace: 200
   0017 leave                                                            (  13)
---------------------

No data to display

Actions

Also available in: Atom PDF

Like0