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 10:35:33 -0500 Message-ID: <87r4zwpqka.fsf@pobox.com> References: <1323186803.10347.140661008137717@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 1324568172 8731 80.91.229.12 (22 Dec 2011 15:36:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Dec 2011 15:36:12 +0000 (UTC) Cc: Amatus , 10235@debbugs.gnu.org To: "Jim Pryor" Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Dec 22 16:36:08 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 1Rdkgg-0004cd-A4 for guile-bugs@m.gmane.org; Thu, 22 Dec 2011 16:36:06 +0100 Original-Received: from localhost ([::1]:40177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rdkgf-0007Td-S6 for guile-bugs@m.gmane.org; Thu, 22 Dec 2011 10:36:05 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:54337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdkgY-0007TQ-6W for bug-guile@gnu.org; Thu, 22 Dec 2011 10:36:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdkgS-0002BK-4u for bug-guile@gnu.org; Thu, 22 Dec 2011 10:35:58 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdkgS-0002BG-1Q for bug-guile@gnu.org; Thu, 22 Dec 2011 10:35:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RdkiX-0003zi-TF for bug-guile@gnu.org; Thu, 22 Dec 2011 10:38:01 -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 15:38: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.132456827615342 (code B ref 10235); Thu, 22 Dec 2011 15:38:01 +0000 Original-Received: (at 10235) by debbugs.gnu.org; 22 Dec 2011 15:37:56 +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 1RdkiO-0003zM-4d for submit@debbugs.gnu.org; Thu, 22 Dec 2011 10:37:56 -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 1RdkiI-0003zA-Fn for 10235@debbugs.gnu.org; Thu, 22 Dec 2011 10:37:50 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 9B1A08C5D; Thu, 22 Dec 2011 10:35:35 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=h3RnMaYMCc3274xjfZg3TzKJqPc=; b=ne8KHT BovNGpLvNdXyUtgIwp40y/RvFwrtMgqCqOpnkvxxBjSS1CXumiNwZomXkjiat2Lw oaGzI9oaAgTWX14yB3dZDmX5Ru8vCUhbjp0fxEAdjFcFb0L97jLx6x2j44wmlPdD RXNWY9Zg5xWINdqzuLcLd2w/9UY3T03FnTGQM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=QG840o2BJkdAckV/drPmwB8vOjrcfCRI m/oWxAqzgQq8aDp1FT3V49q0iYcU11D+YJBeWlcDQ03/gRxxBt9vbd7DEeynickH 8qeWYtZpxlNpfU7+eP+Ag2UsZywZA8IL7i0sRLtRnBlkD6fdEBXMZmfKzn+2bjrR UEReC1i5xD0= 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 94B448C5C; Thu, 22 Dec 2011 10:35:35 -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 3F9D48C5B; Thu, 22 Dec 2011 10:35:35 -0500 (EST) In-Reply-To: <1323186803.10347.140661008137717@webmail.messagingengine.com> (Jim Pryor's message of "Tue, 06 Dec 2011 10:53:23 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: 975AA358-2CB2-11E1-A466-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 10:38:01 -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:6010 Archived-At: 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? 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? > +# 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? > ----- 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? > ----- 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? 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. Thanks! Andy -- http://wingolog.org/