ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:117210] [Ruby master Bug#20344] argument stack underflow (-1)
@ 2024-03-18 15:37 nobu (Nobuyoshi Nakada) via ruby-core
  2024-08-18  9:30 ` [ruby-core:118877] " nagachika (Tomoyuki Chikanaga) via ruby-core
  2024-09-02 10:10 ` [ruby-core:119010] " k0kubun (Takashi Kokubun) via ruby-core
  0 siblings, 2 replies; 3+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2024-03-18 15:37 UTC (permalink / raw)
  To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)

Issue #20344 has been reported by nobu (Nobuyoshi Nakada).

----------------------------------------
Bug #20344: argument stack underflow (-1)
https://bugs.ruby-lang.org/issues/20344

* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED
----------------------------------------
This file produces argument stack underflow, since ruby 2.5.

```ruby
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)
---------------------
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:118877] [Ruby master Bug#20344] argument stack underflow (-1)
  2024-03-18 15:37 [ruby-core:117210] [Ruby master Bug#20344] argument stack underflow (-1) nobu (Nobuyoshi Nakada) via ruby-core
@ 2024-08-18  9:30 ` nagachika (Tomoyuki Chikanaga) via ruby-core
  2024-09-02 10:10 ` [ruby-core:119010] " k0kubun (Takashi Kokubun) via ruby-core
  1 sibling, 0 replies; 3+ messages in thread
From: nagachika (Tomoyuki Chikanaga) via ruby-core @ 2024-08-18  9:30 UTC (permalink / raw)
  To: ruby-core; +Cc: nagachika (Tomoyuki Chikanaga)

Issue #20344 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED to 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED

ruby_3_2 commit:21c708ee802e1a59901eccc6448e40e8f72189b8 merged revision(s) commit:992596fb7af18a7f472589a607d0eb3fbb03b49a.

----------------------------------------
Bug #20344: argument stack underflow (-1)
https://bugs.ruby-lang.org/issues/20344#change-109449

* Author: nobu (Nobuyoshi Nakada)
* Status: Closed
* Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED
----------------------------------------
This file produces argument stack underflow, since ruby 2.5.

```ruby
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)
---------------------
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:119010] [Ruby master Bug#20344] argument stack underflow (-1)
  2024-03-18 15:37 [ruby-core:117210] [Ruby master Bug#20344] argument stack underflow (-1) nobu (Nobuyoshi Nakada) via ruby-core
  2024-08-18  9:30 ` [ruby-core:118877] " nagachika (Tomoyuki Chikanaga) via ruby-core
@ 2024-09-02 10:10 ` k0kubun (Takashi Kokubun) via ruby-core
  1 sibling, 0 replies; 3+ messages in thread
From: k0kubun (Takashi Kokubun) via ruby-core @ 2024-09-02 10:10 UTC (permalink / raw)
  To: ruby-core; +Cc: k0kubun (Takashi Kokubun)

Issue #20344 has been updated by k0kubun (Takashi Kokubun).

Backport changed from 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED to 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE, 3.3: DONE

ruby_3_3 commit:d83b5633b16f4ddcece4ff924f21c5a5851470cf merged revision(s) commit:992596fb7af18a7f472589a607d0eb3fbb03b49a.

----------------------------------------
Bug #20344: argument stack underflow (-1)
https://bugs.ruby-lang.org/issues/20344#change-109585

* Author: nobu (Nobuyoshi Nakada)
* Status: Closed
* Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE, 3.3: DONE
----------------------------------------
This file produces argument stack underflow, since ruby 2.5.

```ruby
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)
---------------------
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-02 10:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-18 15:37 [ruby-core:117210] [Ruby master Bug#20344] argument stack underflow (-1) nobu (Nobuyoshi Nakada) via ruby-core
2024-08-18  9:30 ` [ruby-core:118877] " nagachika (Tomoyuki Chikanaga) via ruby-core
2024-09-02 10:10 ` [ruby-core:119010] " k0kubun (Takashi Kokubun) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).