From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Charles Stanhope Newsgroups: gmane.lisp.guile.bugs Subject: bug#39118: Segfault while building on 64-bit Cygwin Date: Mon, 17 Feb 2020 11:27:42 -0800 Message-ID: References: <87zherlphs.fsf@pobox.com> <875zh6gk72.fsf_-_@gnu.org> <20200120172253.GA1112065@spikycactus.com> <87wo90kmw9.fsf@pobox.com> <20200216232334.GA2448000@spikycactus.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000009e8abe059eca8c53" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="54299"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39118@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= , guile-devel@gnu.org To: Mike Gran Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Feb 17 20:30:24 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 1j3m63-000E1h-O3 for guile-bugs@m.gmane-mx.org; Mon, 17 Feb 2020 20:30:23 +0100 Original-Received: from localhost ([::1]:51852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3m62-0001AN-Mj for guile-bugs@m.gmane-mx.org; Mon, 17 Feb 2020 14:30:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55246) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3m3n-0005hw-D4 for bug-guile@gnu.org; Mon, 17 Feb 2020 14:28:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3m3m-0002mA-BX for bug-guile@gnu.org; Mon, 17 Feb 2020 14:28:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33299) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j3m3m-0002ly-86 for bug-guile@gnu.org; Mon, 17 Feb 2020 14:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j3m3m-0002aa-5p for bug-guile@gnu.org; Mon, 17 Feb 2020 14:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Charles Stanhope Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 17 Feb 2020 19:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39118 X-GNU-PR-Package: guile Original-Received: via spool by 39118-submit@debbugs.gnu.org id=B39118.15819676699933 (code B ref 39118); Mon, 17 Feb 2020 19:28:02 +0000 Original-Received: (at 39118) by debbugs.gnu.org; 17 Feb 2020 19:27:49 +0000 Original-Received: from localhost ([127.0.0.1]:39272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3m3Y-0002a9-KI for submit@debbugs.gnu.org; Mon, 17 Feb 2020 14:27:48 -0500 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:45501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3m3V-0002a0-Rz for 39118@debbugs.gnu.org; Mon, 17 Feb 2020 14:27:46 -0500 Original-Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (Authenticated sender: charles@stanho.pe) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 3ABD0100006 for <39118@debbugs.gnu.org>; Mon, 17 Feb 2020 19:27:43 +0000 (UTC) Original-Received: by mail-lj1-f181.google.com with SMTP id w1so20131050ljh.5 for <39118@debbugs.gnu.org>; Mon, 17 Feb 2020 11:27:43 -0800 (PST) X-Gm-Message-State: APjAAAUtG+RotAk77V5YqNS30sxgGVXbu0U4Cxp5wkHH3/o2vlkOkmac xMXj6/wgxOawycVShFfsitRalnM36E96f8R7TT3njA== X-Google-Smtp-Source: APXvYqyW3MJTDlHa0kh+wbNc+P0zdj/Ck+HLyA8odgVqzcp37mOdmZF/Kd+57JKB1qBPP/OSPmrleohFQHjQaOeg528= X-Received: by 2002:a2e:95c4:: with SMTP id y4mr10704057ljh.38.1581967663325; Mon, 17 Feb 2020 11:27:43 -0800 (PST) Original-Received: by 2002:ab3:6883:0:0:0:0:0 with HTTP; Mon, 17 Feb 2020 11:27:42 -0800 (PST) X-Originating-IP: [50.45.151.166] In-Reply-To: X-Gmail-Original-Message-ID: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:9585 Archived-At: --0000000000009e8abe059eca8c53 Content-Type: text/plain; charset="UTF-8" On 2/16/20, Charles Stanhope wrote: > On 2/16/20, Mike Gran wrote: >> >> I can confirm that Charles's patch, plus another one line patch >> to define CPU_SETSIZE, is enough to get Guile 3.0.x to build and run >> on my box. All tests pass except strptime in French, and the absence >> of crypt. This is a 64-bit build. > > Mike, thanks for going further with the Guile build. The CPU_SETSIZE > issue was what was hanging me up from compiling before Andy's comment > got me to look at lightening. I assumed I had some configuration, > package, or compiler issue. Good to know there's a simple fix. > > Just a further warning to anyone watching, that patch I posted is a > real hack job just to test my theory of the cause of the segfault. I > would expect it to fail when you have fewer than four arguments in a > JITed function call. I wouldn't try doing much else with that Guile > build besides run the tests. :) I had a little bit more time to look into the lightening implementation last night. I've attached a patch that is less horrible and more correct than my previous one. It reserves the stack space regardless of the number of parameters and appears to work. But I'm new to the lightening code base, so I'm not convinced it is the correct solution. It's just the solution I was left with after my time ran out. I wanted to post this patch as a replacement to the prior one in case people did want to do more testing with Guile 3.0 on Cygwin x64. With that, I will let more experienced people come up with the appropriate solution. Happy hacking, everybody! -- Charles --0000000000009e8abe059eca8c53 Content-Type: text/x-patch; charset="US-ASCII"; name="x86-fastcall-stack-reservation-2.patch" Content-Disposition: attachment; filename="x86-fastcall-stack-reservation-2.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: file0 ZGlmZiAtLWdpdCBhL2xpZ2h0ZW5pbmcveDg2LmMgYi9saWdodGVuaW5nL3g4Ni5jCmluZGV4IDk2 NTE5MWEuLmJkZDI2ZTEgMTAwNjQ0Ci0tLSBhL2xpZ2h0ZW5pbmcveDg2LmMKKysrIGIvbGlnaHRl bmluZy94ODYuYwpAQCAtMzI4LDYgKzMyOCwxMCBAQCByZXNldF9hYmlfYXJnX2l0ZXJhdG9yKHN0 cnVjdCBhYmlfYXJnX2l0ZXJhdG9yICppdGVyLCBzaXplX3QgYXJnYywKICAgbWVtc2V0KGl0ZXIs IDAsIHNpemVvZiAqaXRlcik7CiAgIGl0ZXItPmFyZ2MgPSBhcmdjOwogICBpdGVyLT5hcmdzID0g YXJnczsKKyNpZiBfX0NZR1dJTl9fICYmIF9fWDY0CisgIC8vIFJlc2VydmUgc2xvdHMgb24gdGhl IHN0YWNrIGZvciA0IHJlZ2lzdGVyIHBhcmFtZXRlcnMgKDggYnl0ZXMgZWFjaCkuCisgIGl0ZXIt PnN0YWNrX3NpemUgPSAzMjsKKyNlbmRpZgogfQogCiBzdGF0aWMgdm9pZAo= --0000000000009e8abe059eca8c53--