From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#10520: [platform-testers] Guile 2.0.4 release imminent Date: Sat, 21 Jan 2012 13:10:29 +0100 Message-ID: <87y5t1cl3e.fsf@gnu.org> References: <87boq6qnel.fsf@gnu.org> <9485528.QKLtPtEgNZ@linuix> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1327147871 22649 80.91.229.12 (21 Jan 2012 12:11:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 Jan 2012 12:11:11 +0000 (UTC) Cc: 10520@debbugs.gnu.org To: Bruno Haible Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Jan 21 13:11:06 2012 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 1RoZmj-0001AT-33 for guile-bugs@m.gmane.org; Sat, 21 Jan 2012 13:11:05 +0100 Original-Received: from localhost ([::1]:57395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoZmi-0007N4-CU for guile-bugs@m.gmane.org; Sat, 21 Jan 2012 07:11:04 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoZmf-0007Mv-Dz for bug-guile@gnu.org; Sat, 21 Jan 2012 07:11:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoZmd-0002dY-Nj for bug-guile@gnu.org; Sat, 21 Jan 2012 07:11:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoZmd-0002dH-Lj for bug-guile@gnu.org; Sat, 21 Jan 2012 07:10:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RoZmf-000837-JS for bug-guile@gnu.org; Sat, 21 Jan 2012 07:11:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 21 Jan 2012 12:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10520 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 10520-submit@debbugs.gnu.org id=B10520.132714784830916 (code B ref 10520); Sat, 21 Jan 2012 12:11:01 +0000 Original-Received: (at 10520) by debbugs.gnu.org; 21 Jan 2012 12:10:48 +0000 Original-Received: from localhost ([127.0.0.1]:38612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RoZmS-00082b-74 for submit@debbugs.gnu.org; Sat, 21 Jan 2012 07:10:48 -0500 Original-Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:31326) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RoZmN-00082F-LL for 10520@debbugs.gnu.org; Sat, 21 Jan 2012 07:10:46 -0500 X-IronPort-AV: E=Sophos;i="4.71,547,1320620400"; d="scan'208";a="128344621" Original-Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 21 Jan 2012 13:10:33 +0100 In-Reply-To: <9485528.QKLtPtEgNZ@linuix> (Bruno Haible's message of "Mon, 16 Jan 2012 02:38:58 +0100") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list 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:6072 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Bruno, Bruno Haible skribis: > 8) On Linux/hppa and Linux/SPARC32 and Linux/IA-64, build failure in the > libguile directory: > > SNARF socket.doc > SNARF regex-posix.doc > GEN guile-procedures.texi > /bin/sh: line 1: 1022 Broken pipe cat alist.doc arbiters.doc= array-handle.doc array-map.doc arrays.doc async.doc backtrace.doc boolean.= doc bitvectors.doc bytevectors.doc chars.doc control.doc continuations.doc = debug.doc deprecated.doc deprecation.doc dynl.doc dynwind.doc eq.doc error.= doc eval.doc evalext.doc expand.doc extensions.doc feature.doc filesys.doc = fluids.doc foreign.doc fports.doc gc-malloc.doc gc.doc gettext.doc generali= zed-arrays.doc generalized-vectors.doc goops.doc gsubr.doc guardians.doc ha= sh.doc hashtab.doc hooks.doc i18n.doc init.doc ioext.doc keywords.doc list.= doc load.doc macros.doc mallocs.doc memoize.doc modules.doc numbers.doc obj= prop.doc options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc p= romises.doc r6rs-ports.doc random.doc rdelim.doc read.doc root.doc rw.doc s= cmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc srfi-1.doc s= rfi-4.doc srfi-13.doc srfi-14.doc srfi-60.doc stackchk.doc stacks.doc stime= .doc strings.doc strorder.doc strports.doc struct.doc symbols.doc threads.d= oc throw.doc trees.doc uniform.doc values.doc variable.doc vectors.doc vers= ion.doc vports.doc weaks.doc dynl.doc posix.doc net_db.doc socket.doc regex= -posix.doc > 1023 Segmentation fault | GUILE_AUTO_COMPILE=3D0 ../meta/unins= talled-env guild snarf-check-and-output-texi > guile-procedures.texi > make[3]: *** [guile-procedures.texi] Error 1 I bisected this and found this harmless-looking patch to be the culprit: http://git.savannah.gnu.org/cgit/guile.git/commit/?id=3D3e54fdfc217969abb= 50a46ec9c9c5c02a2c7d369 The segfault would occur in vm-i-system.c:1281, in the =E2=80=98CACHE_PROGR= AM=E2=80=99 macro, while trying to access =E2=80=98SCM_PROGRAM_DATA=E2=80=99, because o= f a bogus value for =E2=80=98program=E2=80=99, stemming from a bogus =E2=80=98fp=E2= =80=99. After a long and tiring period of investigation, I found that reverting just the definitions SCM_FRAME_DYNAMIC_LINK and SCM_FRAME_SET_DYNAMIC_LINK would solve the problem. Eventually, I found that, keeping frames.h unchanged, adding a compiler barrier after each =E2=80=98fp=E2=80=99 assignment would solve the problem: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c index 474fe78..a47ac38 100644 --- a/libguile/vm-i-system.c +++ b/libguile/vm-i-system.c @@ -55,6 +55,7 @@ VM_DEFINE_INSTRUCTION (1, halt, "halt", 0, 0, 0) stack */ ip = SCM_FRAME_RETURN_ADDRESS (fp); fp = SCM_FRAME_DYNAMIC_LINK (fp); + asm volatile (""); NULLSTACK (old_sp - sp); } @@ -1267,6 +1268,7 @@ VM_DEFINE_INSTRUCTION (67, return, "return", 0, 1, 1) sp = SCM_FRAME_LOWER_ADDRESS (fp); ip = SCM_FRAME_RETURN_ADDRESS (fp); fp = SCM_FRAME_DYNAMIC_LINK (fp); + asm volatile (""); #ifdef VM_ENABLE_STACK_NULLING NULLSTACK (old_sp - sp); @@ -1302,6 +1304,7 @@ VM_DEFINE_INSTRUCTION (68, return_values, "return/values", 1, -1, -1) sp = SCM_FRAME_LOWER_ADDRESS (fp) - 1; ip = SCM_FRAME_MV_RETURN_ADDRESS (fp); fp = SCM_FRAME_DYNAMIC_LINK (fp); + asm volatile (""); /* Push return values, and the number of values */ for (i = 0; i < nvalues; i++) @@ -1322,6 +1325,7 @@ VM_DEFINE_INSTRUCTION (68, return_values, "return/values", 1, -1, -1) sp = SCM_FRAME_LOWER_ADDRESS (fp) - 1; ip = SCM_FRAME_RETURN_ADDRESS (fp); fp = SCM_FRAME_DYNAMIC_LINK (fp); + asm volatile (""); /* Push first value */ *++sp = vals[1]; --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable This is not entirely satisfactory either, because I don=E2=80=99t see why t= his barrier would be needed. It could be a GCC bug, as this file is a real stress test. Ideas? Unless someone comes up with a better idea, I=E2=80=99ll commit a portable version of the above patch. (Tested on sparc64-unknown-linux-gnu and hppa2.0-unknown-linux-gnu.) Thanks, Ludo=E2=80=99. --=-=-=--