From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: alloca, continuations and debug info Date: Fri, 27 Aug 2004 00:15:47 +0100 Organization: Neil Jerram Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <412E6F23.3020908@ossau.uklinux.net> Reply-To: neil@ossau.uklinux.net NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1093562201 24493 80.91.224.253 (26 Aug 2004 23:16:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Aug 2004 23:16:41 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Aug 27 01:16:33 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C0TTt-0008NM-00 for ; Fri, 27 Aug 2004 01:16:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C0TYW-0001At-JY for guile-devel@m.gmane.org; Thu, 26 Aug 2004 19:21:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C0TYT-0001Ac-6z for guile-devel@gnu.org; Thu, 26 Aug 2004 19:21:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C0TYS-0001A3-0B for guile-devel@gnu.org; Thu, 26 Aug 2004 19:21:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C0TYR-00019w-Hl for guile-devel@gnu.org; Thu, 26 Aug 2004 19:21:15 -0400 Original-Received: from [80.84.72.32] (helo=mail2.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C0TTH-0003jF-U6 for guile-devel@gnu.org; Thu, 26 Aug 2004 19:15:56 -0400 Original-Received: from laruns.ossau.uklinux.net (unknown [213.78.66.27]) by mail2.uklinux.net (Postfix) with ESMTP id EE121409FE6 for ; Thu, 26 Aug 2004 23:15:53 +0000 (UTC) Original-Received: from ossau.uklinux.net (localhost [127.0.0.1]) by laruns.ossau.uklinux.net (Postfix on SuSE Linux 7.2 (i386)) with ESMTP id 848F3DC4D4 for ; Fri, 27 Aug 2004 00:15:50 +0100 (BST) User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.4-4GB i686; en-US; 0.8.1) Gecko/20010515 X-Accept-Language: en Original-To: guile-devel 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: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:4040 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4040 I just traced a crash while displaying a backtrace to a build problem whereby the alloca.c in libguile is unnecessarily picked up (on Windows 2000, which actually has alloca defined as a macro). And I was wondering whether it would be better to remove libguile/alloca.c altogether from the distribution. The problem with the "portable" implementation of alloca in libguile/alloca.c is that the memory which it allocates is not on the stack. Therefore, if you capture a continuation while running the debug evaluator, then invoke the continuation, then do something to cause a backtrace, the scm_t_debug_info's are likely to be garbage because they weren't properly saved and restored by the continuation code. So on any platform which needs libguile/alloca.c - because that platform doesn't have a proper alloca - Guile may crash. I therefore suggest maybe removing libguile/alloca.c from the distribution, and considering other options for the places where alloca is used: - On platforms that have GCC but not alloca (if this is possible), Guile could use GCC's ability to declare variable sized arrays on the stack instead. - Or if GCC not available, Guile could declare a constant sized array for the scm_t_debug_info's. - As a last resort, you could just say: no proper alloca, no Guile! Regards, Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel