From: Mark H Weaver <mhw@netris.org>
To: Panicz Maciej Godek <godek.maciek@gmail.com>
Cc: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: Where is the backtrace?
Date: Fri, 03 Jan 2014 13:03:46 -0500 [thread overview]
Message-ID: <87a9fd0wot.fsf@netris.org> (raw)
In-Reply-To: <CAMFYt2Yoqn49Ypn75FgU+tKV4hRvyf6GWiKkz4=FzmvBQeUZvQ@mail.gmail.com> (Panicz Maciej Godek's message of "Fri, 3 Jan 2014 14:57:33 +0100")
Panicz Maciej Godek <godek.maciek@gmail.com> writes:
> I've checked this with other implementations. Racket, Gambit and Biwa
> Scheme were equally uninformative. Kawa's backtrace was a nightmare to
> me, but perhaps someone with more knowledge would be able to infer the
> actual location of the error. Actually, the only implementation that
> exposed the exact location was Chicken. It proves that there must be a
> way to track this information in spite of TCO.
I suspect the reason Chicken kept the information is that in Chicken,
IIUC, tail calls are just normal C function calls, so the stack fills
until it reaches a certain size and then is garbage collected.
The solution I favor is that of MIT Scheme, which records the backtrace
as a chain of rings. Each time a tail call is done, an entry is
recorded in the topmost ring, so between every two non-tail calls, up to
N tail calls are preserved. If more than N tail calls are done in a
row, then the older ones are forgotten.
Hopefully we'll have this for Guile some day.
Mark
prev parent reply other threads:[~2014-01-03 18:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-03 2:30 Where is the backtrace? Panicz Maciej Godek
2014-01-03 10:28 ` Ian Price
2014-01-03 13:57 ` Panicz Maciej Godek
2014-01-03 16:15 ` Ian Price
2014-01-03 18:03 ` Mark H Weaver [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a9fd0wot.fsf@netris.org \
--to=mhw@netris.org \
--cc=godek.maciek@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).