From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 8747E1F4B4 for ; Thu, 14 Jan 2021 04:34:13 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 3FB3F120B01; Thu, 14 Jan 2021 13:33:21 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 2F62A120AF3 for ; Thu, 14 Jan 2021 13:33:19 +0900 (JST) Received: by filterdrecv-p3iad2-577c7fd65d-fxqdn with SMTP id filterdrecv-p3iad2-577c7fd65d-fxqdn-16-5FFFC9BE-46 2021-01-14 04:34:06.562352306 +0000 UTC m=+120935.201082817 Received: from herokuapp.com (unknown) by geopod-ismtpd-3-7 (SG) with ESMTP id reFoGJunQXm7h8T0Pc8VRw for ; Thu, 14 Jan 2021 04:34:06.536 +0000 (UTC) Date: Thu, 14 Jan 2021 04:34:06 +0000 (UTC) From: xtkoba+ruby@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 77986 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17540 X-Redmine-Issue-Author: xtkoba X-Redmine-Sender: xtkoba X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?75w3+RXRrinEP3ykAS=2F1WzD2vTMrJdTeEiaFbXc9IwUyxTnWPoCNF1Bjof0L2j?= =?us-ascii?Q?QjNS5gGCsP+O01s=2F0AvO2KJ8703JIneEkKe+8kx?= =?us-ascii?Q?Ib7An67coHT3HwkJc=2FNBzTDXFR7RdsMW3lpzxRp?= =?us-ascii?Q?mSUdfBggCO8prCQVtVoM=2F59XN3nfwqvOWkPLiWs?= =?us-ascii?Q?IMBjCJxejoDogXCSh5JsiJvhXIEveiqdVAKaPUn?= =?us-ascii?Q?bGjO2Nt8w1tI68FGs=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 102083 Subject: [ruby-core:102083] [Ruby master Bug#17540] A segfault due to Clang/LLVM optimization on 32-bit ARM Linux X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #17540 has been reported by xtkoba (Tee KOBAYASHI). ---------------------------------------- Bug #17540: A segfault due to Clang/LLVM optimization on 32-bit ARM Linux https://bugs.ruby-lang.org/issues/17540 * Author: xtkoba (Tee KOBAYASHI) * Status: Open * Priority: Normal * ruby -v: ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [armv7a-linux-eabi] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- When built with `optflags=-O3` (which is the default), `ruby -e "pp Thread.main"` causes a segfault, which seems to be worked around by the following change: ``` --- a/include/ruby/internal/fl_type.h +++ b/include/ruby/internal/fl_type.h @@ -231,7 +231,7 @@ RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_ARTIFICIAL() static inline VALUE -RB_FL_TEST_RAW(VALUE obj, VALUE flags) +RB_FL_TEST_RAW(volatile VALUE obj, VALUE flags) { RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj)); return RBASIC(obj)->flags & flags; ``` There might be a bug in the optimizer of Clang/LLVM (version 11.0.1). -- https://bugs.ruby-lang.org/