[adding bug-gnulib] On 06/19/2011 11:35 PM, Paul Eggert wrote: > 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 Hmm, we'll need to backport this improved stack-direction testing to gnulib and libsigsegv, then, since your previous autoconf patch (which has been defeated by newer gcc optimization) was lifted from gnulib's c-stack stack-direction probe. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org