From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Keith Owens Newsgroups: gmane.linux.ports.ia64,gmane.lisp.guile.devel Subject: Re: Problem with Guile on ia64 (possibly "getcontext" related) Date: Sun, 16 Jul 2006 12:54:51 +1000 Message-ID: <16307.1153018491@ocs3.ocs.com.au> References: <87ac7ajylc.fsf@raven.defaultvalue.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1153018496 32142 80.91.229.2 (16 Jul 2006 02:54:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 16 Jul 2006 02:54:56 +0000 (UTC) Cc: linux-ia64@vger.kernel.org, guile-devel@gnu.org Original-X-From: linux-ia64-owner@vger.kernel.org Sun Jul 16 04:54:50 2006 Return-path: Envelope-to: glpi-linux-ia64-2@gmane.org Original-Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G1wmM-00084U-U1 for glpi-linux-ia64-2@gmane.org; Sun, 16 Jul 2006 04:54:47 +0200 Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964828AbWGPCyp (ORCPT ); Sat, 15 Jul 2006 22:54:45 -0400 Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964839AbWGPCyp (ORCPT ); Sat, 15 Jul 2006 22:54:45 -0400 Original-Received: from mail.ocs.com.au ([202.147.117.210]:50224 "EHLO mail.ocs.com.au") by vger.kernel.org with ESMTP id S964828AbWGPCyo (ORCPT ); Sat, 15 Jul 2006 22:54:44 -0400 Original-Received: from ocs3.ocs.com.au (ocs3w.ocs.com.au [192.168.254.3]) by mail.ocs.com.au (Postfix) with ESMTP id 71367E0B209; Sun, 16 Jul 2006 12:54:42 +1000 (EST) Original-Received: by ocs3.ocs.com.au (Postfix, from userid 16331) id 0171CF76; Sun, 16 Jul 2006 12:54:51 +1000 (EST) Original-Received: from ocs3.ocs.com.au (localhost [127.0.0.1]) by ocs3.ocs.com.au (Postfix) with ESMTP id EC30B81ED1; Sun, 16 Jul 2006 12:54:51 +1000 (EST) X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.1 Original-To: Rob Browning In-reply-to: Your message of "Sat, 15 Jul 2006 15:24:31 MST." <87ac7ajylc.fsf@raven.defaultvalue.org> Original-Sender: linux-ia64-owner@vger.kernel.org Precedence: bulk X-Mailing-List: linux-ia64@vger.kernel.org Xref: news.gmane.org gmane.linux.ports.ia64:14581 gmane.lisp.guile.devel:6002 Archived-At: Rob Browning (on Sat, 15 Jul 2006 15:24:31 -0700) wrote: > >Guile 1.6.8 is crashing on ia64 with an illegal instruction whenever >it tries to execute call-with-current-continuation. For those who >don't know, call-with-current-continuation captures the current state >of the computation; it's a language feature somewhat similar to >setjmp. > >The crash seems to be right around an asm "getcontext" call, and after >looking around, I found these two links: > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/144939 > http://lists.freebsd.org/pipermail/freebsd-sparc64/2006-January/003739.html > >They appear claim that adding a dummy (non-executed) setjmp just after >the getcontext call will fix the problem because gcc recognizes >setjmp, but not getcontext, and makes appropriate arrangements. > >So I tried adding a dummy setjmp just after the getcontext call, and >that does fix the problem. > >However, even though this worked, I'd still prefer to have a better >idea that this is the right fix before adopting it. Is that likely? >> >The relevant function is scm_make_continuation which you can find >here: > > http://cvs.savannah.gnu.org/viewcvs/guile/guile-core/libguile/continuations.c?rev=1.38.2.7&root=guile&only_with_tag=branch_release-1-6&view=markup Wild guess, based on no data. Add '__attribute__ ((returns_twice))' to the definition of ia64_getcontext. That should remove the need to use setjmp. - To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html