From: meta@... Date: 2021-05-06T12:30:21+00:00 Subject: [ruby-core:103759] [Ruby master Bug#17854] Crash with certain "case" expressions on FreeBSD Issue #17854 has been reported by meta@vmeta.jp (Koichiro Iwao). ---------------------------------------- Bug #17854: Crash with certain "case" expressions on FreeBSD https://bugs.ruby-lang.org/issues/17854 * Author: meta@vmeta.jp (Koichiro Iwao) * Status: Open * Priority: Normal * ruby -v: ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [amd64-freebsd13] * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- ## Affected version * Ruby 2.6, 2.7, 3.0 compiled with **clang on FressBD** No tested with other versions. Ruby compiled with GCC doesn't have this issue. ## Snippet to reproduce ``` ruby -e 'case 1; when 2r; 3; end' ``` ## Step to reproduce Prepare a fresh installation of FreeBSD 13. Either Ruby installed from system package or ruby-build can reproduce the issue. ``` # clang -v FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) Target: x86_64-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin [root@ruby-bug /tmp]# clang -v FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) Target: x86_64-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin ``` ### System Ruby ``` # pkg install ruby # /usr/local/bin/ruby -v # /usr/local/bin/ruby -e 'case 1; when 2r; 3; end' ``` ### Ruby installed by ruby-build Same as Ruby installed by ruby-build. ``` # pkg install rbenv ruby-build # bash bash# eval "$(rbenv init -)" bash# cd /tmp bash# rbenv install 2.7.3 bash# rbenv local 2.7.3 bash# rbenv which ruby /root/.rbenv/versions/2.7.3/bin/ruby bash# ruby -e 'case 1; when 2r; 3; end' ``` ## See also Downstream bug: * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255583 ---Files-------------------------------- trace.log (37.5 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: