Re: errno in gdb

2007-11-02 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > Jim Meyering wrote: >> I did not set errno, which would normally happen for a real failure. >> I tried, but __errno_location() returns an invalid address. >> Anyone know how to set errno via gdb? > > I normally use > (gdb) print errno = 22 > since in a si

Re: [PATCH] Re: buggy vfprintf makes printf(1) segfault on freebsd 5.0

2007-11-02 Thread Bruno Haible
Jim Meyering wrote: > I think I'll have to resort to using a moderately large width, yet > with limited virtual memory, e.g., via ulimit -v 1. Here is the beginning of a proposal for m4/printf.m4 along these lines. *** m4/printf.m4.orig 2007-11-03 05:38:54.0 +0100 --- m4/printf.m4

Re: uh oh: when to use the xprintf module

2007-11-02 Thread Bruno Haible
Jim Meyering wrote: > Unfortunately, you may well have to use xprintf much more generally, > (or else check all *printf return values) if you care about robustness > under low-memory conditions. Yes, it's not only FreeBSD 5 and NetBSD 3 which are affected by this problem, but also FreeBSD 6, MacOS

Re: errno in gdb

2007-11-02 Thread Bruno Haible
Jim Meyering wrote: > I did not set errno, which would normally happen for a real failure. > I tried, but __errno_location() returns an invalid address. > Anyone know how to set errno via gdb? I normally use (gdb) print errno = 22 since in a single-threaded situation __errno_location() == &errno

uh oh: when to use the xprintf module

2007-11-02 Thread Jim Meyering
Unfortunately, you may well have to use xprintf much more generally, (or else check all *printf return values) if you care about robustness under low-memory conditions. This is because the printf, fputs, fwrite, etc. functions (at least glibc-based functions) always allocate memory upon stream ini

Re: new module 'xprintf-posix'

2007-11-02 Thread Eric Blake
According to Bruno Haible on 10/30/2007 7:23 PM: > > Installed: > > 2007-10-30 Bruno Haible <[EMAIL PROTECTED]> > > * modules/xprintf-posix: New file. Plus this followup, so that tests will pass on cygwin (xprintf pulls in xalloc-die, which requires gettext). From: Eric Blake <[EMAIL P