From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Harke Newsgroups: gmane.lisp.guile.devel Subject: Re: Illegal instruction in test-unwind on ia64. Date: Tue, 12 Dec 2006 21:08:54 -0800 Message-ID: <200612122108.54876.rharke@earthlink.net> References: <87d5707q82.fsf@raven.defaultvalue.org> <200612032012.07765.rharke@earthlink.net> <8764csz0oi.fsf@raven.defaultvalue.org> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1165985846 29726 80.91.229.10 (13 Dec 2006 04:57:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Dec 2006 04:57:26 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Dec 13 05:57:24 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GuMBC-0004HU-Sg for guile-devel@m.gmane.org; Wed, 13 Dec 2006 05:57:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuMBC-0005XK-DD for guile-devel@m.gmane.org; Tue, 12 Dec 2006 23:57:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GuMB9-0005WF-Vg for guile-devel@gnu.org; Tue, 12 Dec 2006 23:57:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GuMB8-0005Vu-My for guile-devel@gnu.org; Tue, 12 Dec 2006 23:57:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuMB8-0005Vp-Gk for guile-devel@gnu.org; Tue, 12 Dec 2006 23:57:14 -0500 Original-Received: from [209.86.89.70] (helo=elasmtp-banded.atl.sa.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GuMB8-0000bR-JD for guile-devel@gnu.org; Tue, 12 Dec 2006 23:57:14 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=ZIoTDx2ZYPgniOgWMVU7zFnrUvhGUkeVQcLVLRKuAad+Wvt/NqzFFF44E9gJrHTG; h=Received:From:To:Subject:Date:User-Agent:References:In-Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-Disposition:Message-Id:X-ELNK-Trace:X-Originating-IP; Original-Received: from [68.164.154.206] (helo=clifford.harke.org) by elasmtp-banded.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1GuMB3-00032R-B3; Tue, 12 Dec 2006 23:57:09 -0500 Original-To: rlb@defaultvalue.org User-Agent: KMail/1.7.2 In-Reply-To: <8764csz0oi.fsf@raven.defaultvalue.org> Content-Disposition: inline X-ELNK-Trace: 141116dce2dcaa9994f5150ab1c16ac0ca5278c929a4b8efbaf8f16e23ab9ad6947a8e4bb6363a59350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 68.164.154.206 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6326 Archived-At: On Sun December 3 2006 21:31, Rob Browning wrote: > Richard Harke writes: > > I thought this might be interesting to look at so I got the sources > > out of unstable. But when I tried to build it, I got a different > > error. Actually a warning treated as error 'returns twice' attribute > > directive ignored This was on line 108 of continuations.c Could this > > be the compiler version? If so, what version to use? > > I'm building in an unstable chroot on an ia64 machine, and there the > compiler is gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-20). > > Thanks I upgraded gcc which required upgrading the kernel, libc and a bunch of stuff and now I can reproduce this problem. Indeed it is in scm_call_1. This essentially calls apply with the continuation created in check_cont_body. the continuation is rejected as illegal and scm_ithrow is called to find a catch to throw to. But the throw is accomplished by calling longjmp on the jmp_buf initialized by the call to setjmp in scm_c_catch. Since scm_c_catch has already exitted, this is not a valid thing to do. Apparently, for most arch's the chances of using srewed up data is small and this usually works. The ia64 has an internal frame value (ar.pfs) which needs to be saved from proc entry to exit. The compiler usually puts the value in one of the local registers in the rotating register set. But these have changed and the value that would be restored to ar.pfs is not valid causing the illegal inst. But the key here is that using the jmp_bug after exiting the routine the called jsetjmp is not proper in any case. Richard Harke _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel