From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Mikael Djurfeldt" Newsgroups: gmane.lisp.guile.devel Subject: Re: stack overflow Date: Thu, 14 Feb 2008 12:39:09 +0100 Message-ID: <66e540fe0802140339n2121e1d9y85fcc9f019d8be0f@mail.gmail.com> References: <47B2A8DF.9070004@tammer.net> <87tzkd8bvz.fsf@gnu.org> <87ejbh8ben.fsf@gnu.org> <47B2D88F.1040505@tammer.net> <87ir0tvx6e.fsf@inria.fr> <87wsp83807.fsf@ossau.uklinux.net> <871w7fore8.fsf@gnu.org> <66e540fe0802140226k3cd96c46x286ac753bbb2b8b7@mail.gmail.com> <87ejbfg4pr.fsf@gnu.org> Reply-To: mikael@djurfeldt.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1202989163 12517 80.91.229.12 (14 Feb 2008 11:39:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Feb 2008 11:39:23 +0000 (UTC) Cc: guile-devel@gnu.org To: "=?ISO-8859-1?Q?Ludovic_Court=E8s?=" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Feb 14 12:39:46 2008 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JPcRM-00011l-LP for guile-devel@m.gmane.org; Thu, 14 Feb 2008 12:39:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPcQs-0002EI-Qz for guile-devel@m.gmane.org; Thu, 14 Feb 2008 06:39:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JPcQq-0002D2-8W for guile-devel@gnu.org; Thu, 14 Feb 2008 06:39:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JPcQp-0002CU-LC for guile-devel@gnu.org; Thu, 14 Feb 2008 06:39:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPcQp-0002CJ-G1 for guile-devel@gnu.org; Thu, 14 Feb 2008 06:39:11 -0500 Original-Received: from wa-out-1112.google.com ([209.85.146.180]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JPcQp-0006h6-4r for guile-devel@gnu.org; Thu, 14 Feb 2008 06:39:11 -0500 Original-Received: by wa-out-1112.google.com with SMTP id k34so541237wah.10 for ; Thu, 14 Feb 2008 03:39:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=Y2mj/gkbcz4i+Zqg9t12IlS+rTfmPnJVGtT3D941k+o=; b=LE4re5lCUsR/hhBk+jw07QkraYWnUHr7oAvaCE/BewTGrRPyRI0Yoi5Wkxhxb8/4ECXIJQnGhpyQuoYfi+X68nQA4hxfIFhf8C0ajhiOq/dpiZ9LO5nMFFUunoYTdyGWVAMj10sXn5Iswi/4S/JejID6yOD75YndIuidTBYJuzk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=dGpA2/8WIfoANMAcXJsQY4uS3WLO4iMbO6ltVMmv9zZEST3XX7uEPeepGc6187U5Pnc1Y+s+aIniVLgfbktJ0iF5NJsdKyT3Ze9txtw5z28LI6ff57c/krctDfyQGgkE3jK2DTNapmSTb9rp6uW5ud0oQk7H9ES7eWXXIr0fNDA= Original-Received: by 10.114.58.1 with SMTP id g1mr1359185waa.91.1202989149616; Thu, 14 Feb 2008 03:39:09 -0800 (PST) Original-Received: by 10.115.92.6 with HTTP; Thu, 14 Feb 2008 03:39:09 -0800 (PST) In-Reply-To: <87ejbfg4pr.fsf@gnu.org> Content-Disposition: inline X-Google-Sender-Auth: fed14b3a3eb2c4cb X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:7006 Archived-At: 2008/2/14, Ludovic Court=E8s : > > Speaking as a user, I would prefer a solution where the evaluator > > measures stack size the same way as currently (i.e. without the need > > to do extra work at every return). It is possible to estimate the > > average sizes of evaluator stack frames during startup and use this as > > a conversion factor in the debug-options interface (scm_debug_opts) so > > that the user setting is approximately consistent between platforms. > > > Hmm, I don't see how we could reliably estimate this, and I'm afraid it > would add non-determinism (e.g., estimate that varies with the phase of > moon, dubious estimates, loads of users suddenly reporting stack > overflows because Fedora Core now ships with a bleeding-edge compiler > noone else uses, etc.). I was thinking about inserting code which actually *measures* the size of frames during startup. This could be done, for example, by introducing a primitive which uses the internal stack measuring functions. One could use this primitive to measure how much stack space some code sample uses. By our knowledge of how many evaluator stack frames this code sample uses, we can compute a reliable estimate for the running instance of Guile.