Project

General

Profile

Actions

Bug #13964

closed

[BUG] Stack consistency error

Added by md1961 (Naoyuki Kumagai) over 6 years ago. Updated about 6 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
[ruby-core:83078]

Description

You get "[BUG] Stack consistency error" when you run attached 'bug_repro.rb'.

If you change line 44 in the script

option_draw&.weight *= 2

to

option_draw.weight *= 2 if option_draw

you get no error.

Also if you change line 63 in the script

2.times do |age|

to

1.times do |age|

you get no error neither.

Thank you in advance.


Files

bug_repro.rb (1016 Bytes) bug_repro.rb Script to reproduce error md1961 (Naoyuki Kumagai), 10/02/2017 05:47 AM
bug_repro.out (11 KB) bug_repro.out Output for error md1961 (Naoyuki Kumagai), 10/02/2017 05:47 AM
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

  • Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN to 2.3: REQUIRED, 2.4: REQUIRED
Actions #2

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r60099.


compile.c: fix stack consitency error

  • compile.c (iseq_compile_each0): fix stack consitency error on
    attr-assign with safe navigation operator when the receiver is
    nil, should pop it too. [ruby-core:83078] [Bug #13964]

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Backport changed from 2.3: REQUIRED, 2.4: REQUIRED to 2.3: REQUIRED, 2.4: DONE

ruby_2_4 r61439 merged revision(s) 60099,60100.

Updated by usa (Usaku NAKAMURA) about 6 years ago

  • Backport changed from 2.3: REQUIRED, 2.4: DONE to 2.3: DONE, 2.4: DONE

ruby_2_3 r62135 merged revision(s) 60099,60100.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0