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.devel Subject: Re: Segfault while building on 64-bit Cygwin Date: Sun, 16 Feb 2020 17:08:25 -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: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="93325"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andy Wingo , 39118@debbugs.gnu.org, =?UTF-8?Q?Ludovic_Court=C3=A8s?= , John Cowan , guile-devel@gnu.org To: Mike Gran Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Mon Feb 17 02:08:43 2020 Return-path: Envelope-to: guile-devel@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 1j3Utu-000ODj-P1 for guile-devel@m.gmane-mx.org; Mon, 17 Feb 2020 02:08:42 +0100 Original-Received: from localhost ([::1]:38530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3Utt-0004ed-S6 for guile-devel@m.gmane-mx.org; Sun, 16 Feb 2020 20:08:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35095) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3Utj-0004eT-LB for guile-devel@gnu.org; Sun, 16 Feb 2020 20:08:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3Uti-0006tf-JW for guile-devel@gnu.org; Sun, 16 Feb 2020 20:08:31 -0500 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:53309) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j3Uti-0006pn-EB for guile-devel@gnu.org; Sun, 16 Feb 2020 20:08:30 -0500 X-Originating-IP: 209.85.167.53 Original-Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (Authenticated sender: charles@stanho.pe) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 72997C0003 for ; Mon, 17 Feb 2020 01:08:26 +0000 (UTC) Original-Received: by mail-lf1-f53.google.com with SMTP id b15so10597899lfc.4 for ; Sun, 16 Feb 2020 17:08:26 -0800 (PST) X-Gm-Message-State: APjAAAVJDSYtkeaejw91/wxzDWTMEE2kWR2mkgbTs/cvgrHeroIYxEwP C1ZjvJpJesDBD4hsBHeJ95D2TuYud57JYL49veSsBg== X-Google-Smtp-Source: APXvYqyym6fbUOICiTd2QJEirWm8guCPYJ0EOs/Zl5t/gOWTrPaRzf+QQS2c8ELUjDgU9kBVGLFZ5GQzYtVe7tItBxI= X-Received: by 2002:a19:5504:: with SMTP id n4mr6320721lfe.25.1581901705559; Sun, 16 Feb 2020 17:08:25 -0800 (PST) Original-Received: by 2002:ab3:6883:0:0:0:0:0 with HTTP; Sun, 16 Feb 2020 17:08:25 -0800 (PST) X-Originating-IP: [50.45.151.166] In-Reply-To: <20200216232334.GA2448000@spikycactus.com> X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.198 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20420 Archived-At: On 2/16/20, Mike Gran wrote: > On Fri, Feb 14, 2020 at 09:46:04AM -0800, Charles Stanhope wrote: >> Andy, I don't know if you'd want to continue this here or on >> lightening's gitlab page, but I looked into this a little bit a few >> minutes here and there this past weeek. The x86 "fast-call" calling >> convention used on Windows x64[0] and shared by Cygwin[1] requires >> that the caller reserve 32 bytes of memory on the stack for the callee >> to spill the register parameters (even if the callee takes fewer than >> four parameters). I think lightening is currently missing that for the >> x64 case for Cygwin. >> >> To test the idea, I made a small modification (patch attached) that is >> *not* intended as a solution as it doesn't work for the general case, >> but it does allow the tests to pass on Cygwin 64. > > 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. :) -- Charles