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:44:06 -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="13776"; 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:45:31 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 1koDdq-0003SK-QE for guile-bugs@m.gmane-mx.org; Sat, 12 Dec 2020 23:45:30 +0100 Original-Received: from localhost ([::1]:44748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koDdp-0008Tp-S2 for guile-bugs@m.gmane-mx.org; Sat, 12 Dec 2020 17:45:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koDdO-0008Sb-DW for bug-guile@gnu.org; Sat, 12 Dec 2020 17:45:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koDdN-0008SV-OJ for bug-guile@gnu.org; Sat, 12 Dec 2020 17:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1koDdN-0001C1-Ji for bug-guile@gnu.org; Sat, 12 Dec 2020 17:45: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:45: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.16078130544491 (code B ref -1); Sat, 12 Dec 2020 22:45:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Dec 2020 22:44:14 +0000 Original-Received: from localhost ([127.0.0.1]:47078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koDcc-0001AN-9t for submit@debbugs.gnu.org; Sat, 12 Dec 2020 17:44:14 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:38288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koDca-0001AG-KY for submit@debbugs.gnu.org; Sat, 12 Dec 2020 17:44:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koDca-0008Bo-D2 for bug-guile@gnu.org; Sat, 12 Dec 2020 17:44:12 -0500 Original-Received: from belmont80srvr.owm.bell.net ([184.150.200.80]:33978 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 1koDcV-0008Bf-1U for bug-guile@gnu.org; Sat, 12 Dec 2020 17:44:12 -0500 Original-Received: from bell.net mtlfep02 184.150.200.30 by mtlfep02.bell.net with ESMTP id <20201212224405.XKKO52743.mtlfep02.bell.net@mtlspm01.bell.net> for ; Sat, 12 Dec 2020 17:44:05 -0500 Original-Received: from [192.168.2.49] (really [67.70.16.145]) by mtlspm01.bell.net with ESMTP id <20201212224405.MIBR130487.mtlspm01.bell.net@[192.168.2.49]>; Sat, 12 Dec 2020 17:44:05 -0500 In-Reply-To: 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=7DgbtJf-5hdC8NJyeGMA:9 a=QEXdDO2ut3YA:10 a=9gvnlMMaQFpL9xblJ6ne:22 X-CM-Envelope: MS4wfD7wnwr6cITUoMfQ2ZryvxT+ejq4KrGv5ifs5D1z55AluKsScTs3yzYV1cM6qZD14qSQu3gYM70nzB6NgCGw+VrXAEfiS1gAKaRmF/W1qjuFDtQDSQsd /i5HI0adjW8MLEOEXLxIa1sGjHV9XVsjDFUPZSSzcIOvkeA15BtkGL95 Received-SPF: pass client-ip=184.150.200.80; 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_H2=-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:9931 Archived-At: On 2020-12-12 5:30 p.m., John David Anglin wrote: > 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. Guess, I should have copied the whole bit: The last option is: #else /* This should be used as a fall back solution for machines on which    casting to a pointer may lead to loss of bit information, e. g. in    the three least significant bits.  */   typedef scm_t_bits SCM; # define SCM_UNPACK(x) (x) # define SCM_PACK(x) ((SCM) (x)) #endif I think strictness 1 may be problematic on hppa. Dave -- John David Anglin dave.anglin@bell.net