Project

General

Profile

Actions

Bug #19263

closed

MJIT fails to compile multiple values in a single case in Ruby 3.2.0

Added by k0kubun (Takashi Kokubun) over 1 year ago. Updated about 1 year ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:111438]

Description

$ cat test.rb
def test(a)
  case a
  when true, false
    a
  end
end

test(true)
test(true)

$ ruby --mjit-verbose=1 --mjit-wait --mjit-call-threshold=2 test.rb
/tmp/_ruby_mjit_p237606u1.c: In function ‘_mjit0’:
/tmp/_ruby_mjit_p237606u1.c:58:7: error: duplicate case value
   58 |       case 19:
      |       ^~~~
compilation terminated due to -Wfatal-errors.
Successful MJIT finish

I'd like to backport this fix https://github.com/ruby/ruby/commit/fc03ba50f1ff6c30f7c654f564b4dffbed0844ef to (only) ruby_3_2 branch.

Updated by k0kubun (Takashi Kokubun) over 1 year ago

I've pushed the fix. Please backport https://github.com/ruby/ruby/commit/fc03ba50f1ff6c30f7c654f564b4dffbed0844ef to ruby_3_2 branch. Other older branches shouldn't need this patch.

Actions #2

Updated by k0kubun (Takashi Kokubun) over 1 year ago

  • Description updated (diff)
Actions #3

Updated by k0kubun (Takashi Kokubun) over 1 year ago

  • Status changed from Open to Closed

Updated by naruse (Yui NARUSE) about 1 year ago

  • Backport changed from 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED to 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONE

ruby_3_2 5c551ac59f9620901394a46dffda5a1833b9c4b0 merged revision(s) fc03ba50f1ff6c30f7c654f564b4dffbed0844ef.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0