From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dave Musicant Newsgroups: gmane.lisp.guile.user Subject: Trying to understand trace limit Date: Mon, 28 Sep 2020 12:06:03 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29870"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 Thunderbird/68.10.0 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Sep 28 19:06:45 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 1kMwbs-0007gN-Je for guile-user@m.gmane-mx.org; Mon, 28 Sep 2020 19:06:44 +0200 Original-Received: from localhost ([::1]:34388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMwbr-0006DS-Jh for guile-user@m.gmane-mx.org; Mon, 28 Sep 2020 13:06:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMwbK-0006BO-BP for guile-user@gnu.org; Mon, 28 Sep 2020 13:06:10 -0400 Original-Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]:36793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMwbH-0004tM-1o for guile-user@gnu.org; Mon, 28 Sep 2020 13:06:09 -0400 Original-Received: by mail-io1-xd2b.google.com with SMTP id u19so1905524ion.3 for ; Mon, 28 Sep 2020 10:06:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=carleton.edu; s=google; h=from:subject:to:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=91vGHquYhTUJD7D292Hr3Z7uvtkiYT7SA8BRsHfnw38=; b=KKw7ZsyqqIiQh5Je+C86Z3h/rAWUeZ7WWFysQVa6l2GP0MC35xEfrJ5wRR2TkT0hyk 2ZqOzx/7Xxqo9oCnsfhbqFf2gY4E9TWm04E0FX9Vb2vmqnsOa2ttVjd8zBm4tgCxNlW8 hr9Byj2X+b+9/3kI8VSm+y5s04gx9Q3Jn5mes= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=91vGHquYhTUJD7D292Hr3Z7uvtkiYT7SA8BRsHfnw38=; b=IrdnROMp4aZ6UVjSV8v+/lhMdxvDJGYXWDFAKswgwDUopbyeUxkCsIICvC4RFlNXSx O2lmow6xUpHAcsaRp2Tm5ypWY/YU+y3EP5TrjuluxwpnCbGJ41Uoy9dJubhktQ8iSFQp 6Akr12Sa7T47qCZqWaNu/G4Z4+hm1+GHlQCvYXvlXZcWAsGPFdRl3gdu2ybMMiT8awAi lGMGye33EnsVeiSIdVcarxZ8PsERpG0yzqXMKh6F9e+e1f6g5L0yKOPb9gAnAR2djAqG J7CS+Kxr9gB9foX71a2xDHGudLTkhd5uEbEEnzG/hrLZgt4iW++qds7AoQSRm199Tukh gIYA== X-Gm-Message-State: AOAM533futlPKb2/yRTu+5l9cO8QySqShyg60C2i1GBEjJStxwssFYN9 md68EDBTKJV81JgiRYnGpQHA2BFJWyh+4wWRCj1VnXxMPZ20L7Ceb4+CbqMrTOI/mDH5LO/kFMV 5JGVRyhQXqjXHTA8xPKz0Ws0GejCTm/VVuVkg2RxBSw7W2tv0lmUMNSN4hhmLGUMwzA== X-Google-Smtp-Source: ABdhPJyOme0jcHhM/0e4JV6GciRtOJVZ7ZMLBM3acjpY0yiJ7Ew6/25t68YpzAGJQBMIDNO5EzvwZg== X-Received: by 2002:a6b:3bd3:: with SMTP id i202mr7762673ioa.145.1601312764928; Mon, 28 Sep 2020 10:06:04 -0700 (PDT) Original-Received: from [192.168.1.131] (066-188-189-106.res.spectrum.com. [66.188.189.106]) by smtp.gmail.com with ESMTPSA id l10sm848422ilm.75.2020.09.28.10.06.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Sep 2020 10:06:04 -0700 (PDT) Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::d2b; envelope-from=dmusicant@carleton.edu; helo=mail-io1-xd2b.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, 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-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:16952 Archived-At: 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