From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John David Anglin Newsgroups: gmane.lisp.guile.bugs Subject: bug#45214: guile segfaults on 32-bit big-endian targets Date: Sat, 12 Dec 2020 17:30:00 -0500 Message-ID: References: <56553e87-ec27-d287-9e5b-fc501bc4b2dc@physik.fu-berlin.de> <155f44c6-dda1-dec9-cc4c-b029a73e65d7@bell.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35353"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 Cc: Helge Deller , Michael Karcher , Andreas Schwab To: glaubitz@physik.fu-berlin.de, 45214@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Dec 12 23:31:08 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koDPw-00098R-5u for guile-bugs@m.gmane-mx.org; Sat, 12 Dec 2020 23:31:08 +0100 Original-Received: from localhost ([::1]:39126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koDPv-0005Pg-6W for guile-bugs@m.gmane-mx.org; Sat, 12 Dec 2020 17:31:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koDPq-0005Np-1N for bug-guile@gnu.org; Sat, 12 Dec 2020 17:31:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koDPp-000420-PU for bug-guile@gnu.org; Sat, 12 Dec 2020 17:31:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1koDPp-0000pH-M6 for bug-guile@gnu.org; Sat, 12 Dec 2020 17:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: John David Anglin Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 12 Dec 2020 22:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45214 X-GNU-PR-Package: guile X-Debbugs-Original-To: John Paul Adrian Glaubitz , bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16078122123104 (code B ref -1); Sat, 12 Dec 2020 22:31:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Dec 2020 22:30:12 +0000 Original-Received: from localhost ([127.0.0.1]:47043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koDP1-0000ny-NB for submit@debbugs.gnu.org; Sat, 12 Dec 2020 17:30:11 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:60806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koDP1-0000nr-3c for submit@debbugs.gnu.org; Sat, 12 Dec 2020 17:30:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koDP0-00050T-SH for bug-guile@gnu.org; Sat, 12 Dec 2020 17:30:10 -0500 Original-Received: from belmont79srvr.owm.bell.net ([184.150.200.79]:42365 helo=mtlfep02.bell.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1koDOr-0003ao-2T for bug-guile@gnu.org; Sat, 12 Dec 2020 17:30:03 -0500 Original-Received: from bell.net mtlfep02 184.150.200.30 by mtlfep02.bell.net with ESMTP id <20201212223000.XAVJ52743.mtlfep02.bell.net@mtlspm01.bell.net> for ; Sat, 12 Dec 2020 17:30:00 -0500 Original-Received: from [192.168.2.49] (really [67.70.16.145]) by mtlspm01.bell.net with ESMTP id <20201212223000.MFOP130487.mtlspm01.bell.net@[192.168.2.49]>; Sat, 12 Dec 2020 17:30:00 -0500 In-Reply-To: <155f44c6-dda1-dec9-cc4c-b029a73e65d7@bell.net> Content-Language: en-US X-CM-Analysis: v=2.3 cv=Z9OS40ZA c=1 sm=1 tr=0 a=ch4VMz8uGZlcRCFa+4Q1bQ==:117 a=ch4VMz8uGZlcRCFa+4Q1bQ==:17 a=IkcTkHD0fZMA:10 a=zTNgK-yGK50A:10 a=FBHGMhGWAAAA:8 a=CXD3Ia8THAbdIFGYXEYA:9 a=QEXdDO2ut3YA:10 a=9gvnlMMaQFpL9xblJ6ne:22 X-CM-Envelope: MS4wfFtypq9yEyrsVon5IUHW5ICFgMoIkq6DzIw73ObI9QHAHEFtZ1mXa8VwQftfcguEq//nXlqcORI1nEcIYejsV/oERggcma/sN2t9jhmFqnYBpWB7vWrx +53/VIgAkGqU8Fc2LihKQH+9A6VSwsLsbdJGP3qT7yCc2KJipj7wTAwE Received-SPF: pass client-ip=184.150.200.79; envelope-from=dave.anglin@bell.net; helo=mtlfep02.bell.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9930 Archived-At: On 2020-12-12 5:21 p.m., John David Anglin wrote: > On 2020-12-12 4:26 p.m., John Paul Adrian Glaubitz wrote: >> I assume the crash has got something to do how values are packed and unpacked >> into the SCM object type. I have not been able to find the problem yet myself, >> unfortunately which is why I am reporting this issue here. > I see this in scm.h: > > /* The 0?: constructions makes sure that the code is never executed, and >    that there is no performance hit.  However, the alternative is >    compiled, and does generate a warning when used with the wrong >    pointer type.  We use a volatile pointer type to avoid warnings from >    clang. > >    The Tru64 and ia64-hp-hpux11.23 compilers fail on `case (0?0=0:x)' >    statements, so for them type-checking is disabled.  */ > # if defined __DECC || defined __HP_cc > #  define SCM_UNPACK(x) ((scm_t_bits) (x)) > # else > #  define SCM_UNPACK(x) ((scm_t_bits) (0? (*(volatile SCM *)0=(x)): x)) > # endif Also just before, there is: /* But as external interface, we define SCM, which may, according to the    desired level of type checking, be defined in several ways.  */ #if (SCM_DEBUG_TYPING_STRICTNESS == 2)   typedef union SCM { struct { scm_t_bits n; } n; } SCM; # define SCM_UNPACK(x) ((x).n.n) # define SCM_PACK(x) ((SCM) { { (scm_t_bits) (x) } }) #elif (SCM_DEBUG_TYPING_STRICTNESS == 1) /* This is the default, which provides an intermediate level of compile    time type checking while still resulting in very efficient code.  */   typedef struct scm_unused_struct { char scm_unused_field; } *SCM; The fault on hppa appears to be at strictness 1. Regards, Dave -- John David Anglin dave.anglin@bell.net