[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in check for stack growth direction in _AC_LIBOBJ_ALLOCA
From: |
Paul Eggert |
Subject: |
Re: bug in check for stack growth direction in _AC_LIBOBJ_ALLOCA |
Date: |
Sun, 19 Jun 2011 22:35:37 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10 |
On 06/19/11 12:01, Andy Wingo wrote:
> No, this program also exhibits the same incorrect behavior, for purposes
> of stack growth checking.
Thanks, I guess we'll have to turn it up a notch. How about the
following test program?
int
find_stack_direction (int *addr, int depth)
{
int dir, dummy = 0;
if (! addr)
addr = &dummy;
*addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
dir = depth ? find_stack_direction (addr, depth - 1) : 0;
return dir + dummy;
}
int
main (int argc, char **argv)
{
return find_stack_direction (0, argc + !argv + 20) < 0;
}
This program is reflected in my most recent patch, here:
http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497
- bug in check for stack growth direction in _AC_LIBOBJ_ALLOCA, Andy Wingo, 2011/06/18
- Re: bug in check for stack growth direction in _AC_LIBOBJ_ALLOCA, Paul Eggert, 2011/06/18
- Re: bug in check for stack growth direction in _AC_LIBOBJ_ALLOCA, Andy Wingo, 2011/06/20
- Re: bug in check for stack growth direction in _AC_LIBOBJ_ALLOCA, Eric Blake, 2011/06/20
- Re: bug in check for stack growth direction in _AC_LIBOBJ_ALLOCA, Paul Eggert, 2011/06/20
- Re: bug in check for stack growth direction in _AC_LIBOBJ_ALLOCA, Ralf Wildenhues, 2011/06/21
- Re: bug in check for stack growth direction in _AC_LIBOBJ_ALLOCA, Paul Eggert, 2011/06/21
Re: bug in check for stack growth direction in _AC_LIBOBJ_ALLOCA, Eric Blake, 2011/06/20