From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= Newsgroups: gmane.lisp.guile.user Subject: Re: Trying to understand trace limit Date: Sat, 3 Oct 2020 00:15:20 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4226"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user To: Dave Musicant Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Oct 03 09:15:47 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOblj-0000x4-BO for guile-user@m.gmane-mx.org; Sat, 03 Oct 2020 09:15:47 +0200 Original-Received: from localhost ([::1]:56856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kObli-000273-9M for guile-user@m.gmane-mx.org; Sat, 03 Oct 2020 03:15:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOblX-00026k-LD for guile-user@gnu.org; Sat, 03 Oct 2020 03:15:35 -0400 Original-Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:44244) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kOblV-0001Wk-RI for guile-user@gnu.org; Sat, 03 Oct 2020 03:15:35 -0400 Original-Received: by mail-ej1-x62b.google.com with SMTP id a3so4770380ejy.11 for ; Sat, 03 Oct 2020 00:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=21eQLAqjmnlqPhkif7T5d25CpannYZR1kWWEt5LGUaQ=; b=nLymyiQzBktEaaSG3kqrFAjUOsUtJfWo0uD9ab4Qp+wLs6GfaU72ZuVJyAWvod+3vF 0R63qgLJ/pu+N2Q7M9XAFIVrDCpSkWEIBA2qdtHVN8qUFVgZopWllOx9kPANCTABpyF0 DnPqOq4luy24NDWIlzvbUEzNagTveqVc4bTQAiPCLdDwKY7EwxbZrcGcHZ5kBV59nzTq T/QOBwFzXjCe25h0svWu8uY3XSi5QfunHDxI/H35pzHMtxrvCEEspDUk/fsIX6zj8+q6 iAgC8+FBsw6Ob5gf+og+mbWjK6LkyJyKlj83tyVoOUHZq8LP23rDMhfotXNJ18fz9j5x cGfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=21eQLAqjmnlqPhkif7T5d25CpannYZR1kWWEt5LGUaQ=; b=h2ObnpIbAst6QBDvKgHDMVaRAKD44K7tZoGpBADaBAXC5MsIrvBFvf0MQ4AvbH7A2G 6liI3F/jLp5vUL+GcXgPTbd8c4ayj2+gELV690RIieP4tNJ9IHpamrReHtqQ1zw0cAuy 9DJ4EiYXfcAuIzkQg0+vPcPHpjTsAqEME+yX/3DX+eeOHFh3BRI4KgXWTxmLsnnnWD6Z uiQAFE+tt2uiLYeaMvi4TTwwiMlf3B8HWn15phEebkVNEccJB8ZGZ452yfLjZKCc5+w9 rk31Tb8qRCfaQnSkmG/axSVIT6yw3ziW7gMmMEcAh1WzF0ZRRflFtWb3SrJDgv/bAl3I D7Hg== X-Gm-Message-State: AOAM531U34zW+MbQBWgrO41MVBeZW+c4ao+a6hYSDgCAh78RrnfQqFW3 H4m7HzGOwO1rPfKC2MPFLQqKIBtU06fwBO03EEA= X-Google-Smtp-Source: ABdhPJwThMr/8Q/jJ43c8lIoJv48/ouv8RxvHakVHQnDuNq5/TpHZ+sbbL5pZIMKHowMoA3sMvkEjvMn4uff8Lv3ir8= X-Received: by 2002:a17:906:1a4c:: with SMTP id j12mr538374ejf.372.1601709332169; Sat, 03 Oct 2020 00:15:32 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=aconchillo@gmail.com; helo=mail-ej1-x62b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16956 Archived-At: Hi Dave, On Mon, Sep 28, 2020 at 10:06 AM Dave Musicant wrote: > Hi all, > > I'm seeing some strange behavior with tracing code, which I'd love some > help understanding. I've boiled it down to the following simplified > example: > > (define count > (lambda (n) > (if (equal? n 1) 1 > (+ 1 (count (- n 1)))))) > > ,tr (count 92) > > > When I run the above code (in a fresh Guile instance, via redirecting > from a file), the trace runs to completion. > > However, when I run this version of the code from a file, which runs the > function twice... > > (define count > (lambda (n) > (if (equal? n 1) 1 > (+ 1 (count (- n 1)))))) > > ,tr (count 10) ; runs to completion > ,tr (count 92) ; dies mid-trace > > > ... then the trace dies when it runs the second time, in something that > must be some sort of stack overflow, though the error is fairly cryptic: > > While executing meta-command: > In procedure +: Wrong type argument in position 1: # > > What's happening from a memory perspective where tracing the code the > first time affects how much memory is available for the second time? It > seems that the first run shouldn't affect the stack limit of the second, > but something is going on. > > Thanks for the help. > Dave > I've tried it with Guile 3.0.4 (in macOS) and I didn't get this error. What version of Guile and OS are you using? Aleix