From: Neil Jerram <neil@ossau.uklinux.net>
To: Ivan Shcherbakov <shcherbakov@eit.uni-kl.de>
Cc: bug-guile@gnu.org
Subject: Re: bug in stackchk.h
Date: Sun, 17 Jan 2010 21:44:52 +0000 [thread overview]
Message-ID: <87aawc9zjf.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <1755964398.20100106223738@eit.uni-kl.de> (Ivan Shcherbakov's message of "Wed, 6 Jan 2010 22:37:38 +0100")
Ivan Shcherbakov <shcherbakov@eit.uni-kl.de> writes:
> Hi, All,
>
> There is a bug in libguile/stackchk.h file. In some cases, when
> integer value of the stack pointer is less than stack checking limit,
> false positives are produced.
>
> The following code is responsible for the problem:
> # define SCM_STACK_OVERFLOW_P(s)\
> (SCM_STACK_PTR (s) \
> < (SCM_I_CURRENT_THREAD->base - SCM_STACK_LIMIT))
>
> When SCM_I_CURRENT_THREAD->base < SCM_STACK_LIMIT holds,
> the last part of the exception produces an overflow and the entire
> expression holds even when no stack overflow occurs.
>
> To fix the problem, the SCM_STACK_OVERFLOW() should be replaced by the
> following one:
>
> # define SCM_STACK_OVERFLOW_P(s)\
> ((SCM_I_CURRENT_THREAD->base - SCM_STACK_PTR (s)) \
> > SCM_STACK_LIMIT)
>
> This ensures that the difference between the stack base and the
> examined local variable address is always computed correctly
> regardless the integer value of the stack pointer.
That all makes sense, but are you seeing this problem in practice?
Thanks,
Neil
next prev parent reply other threads:[~2010-01-17 21:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-06 21:37 bug in stackchk.h Ivan Shcherbakov
2010-01-17 21:44 ` Neil Jerram [this message]
2010-01-17 21:46 ` Ivan Shcherbakov
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=87aawc9zjf.fsf@ossau.uklinux.net \
--to=neil@ossau.uklinux.net \
--cc=bug-guile@gnu.org \
--cc=shcherbakov@eit.uni-kl.de \
/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).