From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#10235: guile 2.0.3 segfaults on FreeBSD 9 Date: Thu, 22 Dec 2011 16:41:16 -0500 Message-ID: <87fwgcp9mr.fsf@pobox.com> References: <1323186803.10347.140661008137717@webmail.messagingengine.com> <87r4zwpqka.fsf@pobox.com> <1324569357.9323.140661014858397@webmail.messagingengine.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1324590122 3581 80.91.229.12 (22 Dec 2011 21:42:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Dec 2011 21:42:02 +0000 (UTC) Cc: 10235@debbugs.gnu.org To: "Jim Pryor" Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Dec 22 22:41:57 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RdqOj-0007OP-DA for guile-bugs@m.gmane.org; Thu, 22 Dec 2011 22:41:57 +0100 Original-Received: from localhost ([::1]:33403 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdqOi-000667-R5 for guile-bugs@m.gmane.org; Thu, 22 Dec 2011 16:41:56 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:60590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdqOf-00065z-IM for bug-guile@gnu.org; Thu, 22 Dec 2011 16:41:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdqOc-0003f1-VA for bug-guile@gnu.org; Thu, 22 Dec 2011 16:41:53 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdqOc-0003et-RJ for bug-guile@gnu.org; Thu, 22 Dec 2011 16:41:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RdqQk-000444-2g for bug-guile@gnu.org; Thu, 22 Dec 2011 16:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 22 Dec 2011 21:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10235 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 10235-submit@debbugs.gnu.org id=B10235.132459021815589 (code B ref 10235); Thu, 22 Dec 2011 21:44:01 +0000 Original-Received: (at 10235) by debbugs.gnu.org; 22 Dec 2011 21:43:38 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdqQL-00043N-L0 for submit@debbugs.gnu.org; Thu, 22 Dec 2011 16:43:38 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62] helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdqQF-00043C-Lx for 10235@debbugs.gnu.org; Thu, 22 Dec 2011 16:43:35 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 732A88FD9; Thu, 22 Dec 2011 16:41:19 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=R6Ki/hJ9dgvM5HpFYPB3oiHkvWs=; b=Im1pRb lYjQ+GrwHEf94RlNzml9IeS7UYYPWS0Xb/FIoukx0kGbEB3RGqnJT7nenFD1K5uj qihFNSGFmgNAJ+/ckUefOdxDRn5jIWPCaiKRE5FaH9bPsF+6PvS0sabd5B0JpjmL ki+WEj+F1tvY37wwAUPs07vnHMiuipn1U/VMw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; q=dns; s=sasl; b=GVjIHphyXzwVqgd1YJZVBSoaFCYm3Onj rWq7c+9foEXOhJwHbmzjXxDrD0GxWqRfqjQZ0ePEBVGp/jZ0kA6XavHpfYt/QvxO THLdKrxmKkam8NfWMcSi9816hMivAEN7D3qowB4WSyoGXV7dKExzFwibE94GOBo/ KLQraerKb70= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 6BAFF8FD8; Thu, 22 Dec 2011 16:41:19 -0500 (EST) Original-Received: from badger (unknown [184.174.165.119]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 054538FD4; Thu, 22 Dec 2011 16:41:18 -0500 (EST) In-Reply-To: <1324569357.9323.140661014858397@webmail.messagingengine.com> (Jim Pryor's message of "Thu, 22 Dec 2011 10:55:57 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: AEDAC214-2CE5-11E1-9D19-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 22 Dec 2011 16:44:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6011 Archived-At: Hi Jim Thanks for the reply. Let's keep the bug in the Cc. (Sending again with the bug on the Cc this time.) There is no rush on this; I'm happy to work asynchronously. The git repo is indeed at http://git.savannah.gnu.org/cgit/guile.git; use the stable-2.0 branch, though. Cheers, Andy On Thu 22 Dec 2011 10:55, "Jim Pryor" writes: > Hi Andy, thanks for the email. I will get back to you about this as soon > as I have some time to look into it again---which I fear won't be > immediately. > > Some quick replies below. > > > On Thu, Dec 22, 2011, at 10:35 AM, Andy Wingo wrote: >> Hi Jim, >> >> There are some packaging-specific things in your mail, one bug, and a >> few FreeBSD-related things that we should probably fold into Guile. >> I'll try to reply only to those things that we need to do in Guile. >> >> On Tue 06 Dec 2011 10:53, "Jim Pryor" writes: >> >> > REINPLACE_FILES= libguile/smob.c libguile/gc.c \ >> > libguile/mallocs.c libguile/gc-malloc.c >> > >> > post-patch: >> > @cd ${WRKSRC} ; sed -e 's|||g' >> >> I have fixed these files to use stdlib.h instead of malloc.h. >> >> > GEN guile-procedures.texi >> > Segmentation fault (core dumped) >> >> That's a problem :) >> >> > And indeed if you just go to the libguile directory and execute the >> > build `guile` file manually, you get a segfault. Here is the backtrace: >> > >> > #0 0x000000080091f8a5 in scm_c_vm_run () from >> > /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 >> > [New Thread 802807400 (LWP 104574/guile)] >> > (gdb) bt >> > #0 0x000000080091f8a5 in scm_c_vm_run () from >> > /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 >> > #1 0x0000000800895e17 in scm_async_click () from >> > /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 >> > #2 0x00000008008f952f in scm_make_smob_type () from >> > /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 >> >> Can you get a backtrace with symbols? > > OK, I will do that. > >> Also, once you have built a version with symbols, I would like to see >> what is triggering this async, and what the error is. So if you could >> run: >> >> GUILE_AUTO_COMPILE=0 libtool --mode=execute gdb libguile/guile >> >> and see what happens, that would be great. You will likely be able to >> reproduce this error that way. >> >> > --- ./configure.ac.orig 2011-10-07 19:49:48.000000000 -0400 >> > +++ ./configure.ac 2011-12-06 09:35:02.484201526 -0500 >> > @@ -657,7 +657,7 @@ >> > # >> > AC_CHECK_HEADERS([complex.h fenv.h io.h libc.h limits.h malloc.h >> > memory.h process.h string.h \ >> > regex.h rxposix.h rx/rxposix.h sys/dir.h sys/ioctl.h sys/select.h \ >> > -sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h \ >> > +sys/time.h sys/times.h sys/stdtypes.h sys/types.h \ >> > sys/utime.h time.h unistd.h utime.h pwd.h grp.h sys/utsname.h \ >> > direct.h langinfo.h nl_types.h machine/fpu.h poll.h sched.h]) >> >> Why did you need to do this? > > I don't know. Many of these patches are carried over from the existing > port on FreeBSD. (I think that's 1.8.8.) I'll see if I can get the > maintainer to explain, or experiment with omitting the patches and > seeing what breaks. > >> >> > +# pthread_np.h - available on FreeBSD >> >> I applied this and the supporting code, with some small changes. >> Thanks. I also applied the itanium patch. >> >> > -#if defined (sparc) || defined (__sparc__) || defined (__sparc) >> > +#if (defined (sparc) || defined (__sparc__) || defined (__sparc)) && \ >> > + (!defined(__FreeBSD__)) >> > # define SCM_FLUSH_REGISTER_WINDOWS asm("ta 3") >> > #else >> > # define SCM_FLUSH_REGISTER_WINDOWS /* empty */ >> >> Why is this? > > > I don't know, existing patch in the FreeBSD port that I just updated to > apply cleanly to the new version. As before, I'll try to find out more. > I don't have a sparc machine so I can't test what happens if the patch > is omitted. > > >> >> > ----- files/patch-libguile_gen-scmconfig.c ----- >> > --- libguile/gen-scmconfig.c 2008-02-23 21:38:39.310330888 -0600 >> > +++ libguile/gen-scmconfig.c 2008-02-23 21:39:32.909873567 -0600 >> > @@ -123,6 +123,7 @@ >> > >> > #include "gen-scmconfig.h" >> > >> > +#define _ANSI_SOURCE >> > #include >> > #include >> > >> >> Why is this? > > I think I had to add that to get the build to work on FreeBSD. I'll try > to get details for you. > > >> >> > ----- files/patch-libguile_numbers.c ----- >> > --- ./libguile/numbers.c.orig 2011-10-10 16:24:38.000000000 -0400 >> > +++ ./libguile/numbers.c 2011-12-06 05:26:45.391199972 -0500 >> > @@ -148,7 +148,7 @@ >> > >> > >> > #if defined (GUILE_I) >> > -#if defined HAVE_COMPLEX_DOUBLE >> > +#if defined HAVE_COMPLEX_DOUBLE && (defined HAVE_CLOG || defined >> > HAVE_CLOG10 || defined HAVE_CEXP || defined HAVE_USABLE_CSQRT) && >> > defined (SCM_COMPLEX_VALUE) >> > >> > /* For an SCM object Z which is a complex number (ie. satisfies >> > SCM_COMPLEXP), return its value as a C level "complex double". */ >> >> Why is this? > > > Ditto, I'll try to get details. > > >> >> OK, I think that's all that we need to do in Guile. If you can get back >> to me with some explanations on these patches and a transcript of your >> debugging session, that would be great. Also, if you are able to build >> from git, you will find some of your changes incorporated there. > > Sure, I'll use git. I assume this is the repo at > ? -- http://wingolog.org/