[ruby-core:118681] [Ruby master Bug#20651] `false && (1 in 1)` produces argument stack underflow (-1)

Issue #20651 has been reported by tompng (tomoya ishida). ---------------------------------------- Bug #20651: `false && (1 in 1)` produces argument stack underflow (-1) https://bugs.ruby-lang.org/issues/20651 * Author: tompng (tomoya ishida) * Status: Open * ruby -v: ruby 3.4.0dev (2024-07-24T19:55:04Z master 30eba40f9c) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- `false && (1 in 1)` and `true || (1 in 1)` produces argument stack underflow since ruby 3.0 ~~~ # ruby -v ruby 3.4.0dev (2024-07-24T19:55:04Z master 30eba40f9c) [x86_64-linux] # ruby -e "false && (1 in 1)" -- raw disasm-------- trace: 1 0000 putobject false ( 1) 0002 leave ( 1) <L004> [sp: 1, unremovable: 1, refcnt: 1] <L002> [sp: 1, unremovable: 0, refcnt: 0] 0003 pop ( 1) * 0004 pop ( 1) 0005 putobject false ( 1) 0007 leave ( 1) --------------------- -e:1: argument stack underflow (-1) -e: compile error (SyntaxError) ~~~ -- https://bugs.ruby-lang.org/

Issue #20651 has been updated by tompng (tomoya ishida). https://github.com/ruby/ruby/pull/11267 I think this issue is same as https://bugs.ruby-lang.org/issues/20571 ~~~ruby for _ in (true or 1 in 1) end ~~~ ---------------------------------------- Bug #20651: `false && (1 in 1)` produces argument stack underflow (-1) https://bugs.ruby-lang.org/issues/20651#change-109256 * Author: tompng (tomoya ishida) * Status: Open * ruby -v: ruby 3.4.0dev (2024-07-24T19:55:04Z master 30eba40f9c) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- `false && (1 in 1)` and `true || (1 in 1)` produces argument stack underflow since ruby 3.0 ~~~ # ruby -v ruby 3.4.0dev (2024-07-24T19:55:04Z master 30eba40f9c) [x86_64-linux] # ruby -e "false && (1 in 1)" -- raw disasm-------- trace: 1 0000 putobject false ( 1) 0002 leave ( 1) <L004> [sp: 1, unremovable: 1, refcnt: 1] <L002> [sp: 1, unremovable: 0, refcnt: 0] 0003 pop ( 1) * 0004 pop ( 1) 0005 putobject false ( 1) 0007 leave ( 1) --------------------- -e:1: argument stack underflow (-1) -e: compile error (SyntaxError) ~~~ -- https://bugs.ruby-lang.org/

Issue #20651 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED ruby_3_2 commit:50399eebd96c76ce808ea4d84fe39693f585a531 merged revision(s) commit:1870505f478cc75993b296b7144a45137ace6937. ---------------------------------------- Bug #20651: `false && (1 in 1)` produces argument stack underflow (-1) https://bugs.ruby-lang.org/issues/20651#change-109442 * Author: tompng (tomoya ishida) * Status: Closed * ruby -v: ruby 3.4.0dev (2024-07-24T19:55:04Z master 30eba40f9c) [x86_64-linux] * Backport: 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED ---------------------------------------- `false && (1 in 1)` and `true || (1 in 1)` produces argument stack underflow since ruby 3.0 ~~~ # ruby -v ruby 3.4.0dev (2024-07-24T19:55:04Z master 30eba40f9c) [x86_64-linux] # ruby -e "false && (1 in 1)" -- raw disasm-------- trace: 1 0000 putobject false ( 1) 0002 leave ( 1) <L004> [sp: 1, unremovable: 1, refcnt: 1] <L002> [sp: 1, unremovable: 0, refcnt: 0] 0003 pop ( 1) * 0004 pop ( 1) 0005 putobject false ( 1) 0007 leave ( 1) --------------------- -e:1: argument stack underflow (-1) -e: compile error (SyntaxError) ~~~ -- https://bugs.ruby-lang.org/

Issue #20651 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: DONE, 3.3: DONE ruby_3_3 commit:6a4e79533b4454392f3afdfa0c4d35b763b68466 merged revision(s) commit:1870505f478cc75993b296b7144a45137ace6937. ---------------------------------------- Bug #20651: `false && (1 in 1)` produces argument stack underflow (-1) https://bugs.ruby-lang.org/issues/20651#change-109582 * Author: tompng (tomoya ishida) * Status: Closed * ruby -v: ruby 3.4.0dev (2024-07-24T19:55:04Z master 30eba40f9c) [x86_64-linux] * Backport: 3.1: REQUIRED, 3.2: DONE, 3.3: DONE ---------------------------------------- `false && (1 in 1)` and `true || (1 in 1)` produces argument stack underflow since ruby 3.0 ~~~ # ruby -v ruby 3.4.0dev (2024-07-24T19:55:04Z master 30eba40f9c) [x86_64-linux] # ruby -e "false && (1 in 1)" -- raw disasm-------- trace: 1 0000 putobject false ( 1) 0002 leave ( 1) <L004> [sp: 1, unremovable: 1, refcnt: 1] <L002> [sp: 1, unremovable: 0, refcnt: 0] 0003 pop ( 1) * 0004 pop ( 1) 0005 putobject false ( 1) 0007 leave ( 1) --------------------- -e:1: argument stack underflow (-1) -e: compile error (SyntaxError) ~~~ -- https://bugs.ruby-lang.org/
participants (3)
-
k0kubun (Takashi Kokubun)
-
nagachika (Tomoyuki Chikanaga)
-
tompng (tomoya ishida)