Re: locale-related printf bug when using formats with thousands grouping character

2011-01-12 Thread Bruno Haible
The bug affects not only %f but also %g, and it can lead to a SIGSEGV. Reproduce with the bash 3.2.1 built-in: $ LC_ALL=en_US.UTF-8 bash -c "printf \"%'.5gn\" 999.996" 1000 $ LC_ALL=en_US.UTF-8 bash -c "printf \"%'.4gn\" .996" Segmentation fault $ LC_ALL=en_US.UTF-8 bash -c "printf \"

ChangeLog fix for openat-die fix

2011-01-12 Thread Paul Eggert
Jim reminded me that I should have credited Bastien for the bug report and initial patch for the openat-die issue. Sorry about that. I installed this: >From 422ef85558e07719d5aa28a1bab67d789ecb3e70 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 12 Jan 2011 09:51:47 -0800 Subject: [PATCH]

Re: locale-related printf bug when using formats with thousands grouping character

2011-01-12 Thread Andrew J. Schorr
Thanks for the confirmation. I opened a glibc bug on this. http://sourceware.org/bugzilla/show_bug.cgi?id=12394 Here is some sample code to demonstrate the problem (attached to the bug report): #include #include int main(void) { double x; setlocale(LC_NUMERIC, ""); while (scanf("%l

Re: locale-related printf bug when using formats with thousands grouping character

2011-01-12 Thread Jim Meyering
Eric Blake wrote: > [adding bug-gnulib] > > On 01/11/2011 08:40 PM, Andrew J. Schorr wrote: >> On Tue, Jan 11, 2011 at 10:31:26PM -0500, Andrew J. Schorr wrote: >>> Using gawk 3.1.8 on Fedora 13 64-bit linux, I see this: >>> >>> bash-4.1$ (echo 100; echo 99.9998071828) | gawk -v "sq='" >>>

Re: locale-related printf bug when using formats with thousands grouping character

2011-01-12 Thread Eric Blake
[adding bug-gnulib] On 01/11/2011 08:40 PM, Andrew J. Schorr wrote: > On Tue, Jan 11, 2011 at 10:31:26PM -0500, Andrew J. Schorr wrote: >> Using gawk 3.1.8 on Fedora 13 64-bit linux, I see this: >> >> bash-4.1$ (echo 100; echo 99.9998071828) | gawk -v "sq='" '{printf >> "%" sq ".2f\n", $1

Re: Openat without die

2011-01-12 Thread Eric Blake
On 01/12/2011 03:25 AM, Bastien ROUCARIES wrote: >> And, rather than checking != ENOTSUP, it might be safer to check == >> ENOMEM, so that you are minimizing the impact of your change. The whole >> point of patch 3 appears to be avoiding the risk of the fchdir() >> fallback on the rare systems whe

Re: Openat without die

2011-01-12 Thread Bastien ROUCARIES
Le mardi 11 janvier 2011 19:36:36, Eric Blake a écrit : > On 01/11/2011 10:50 AM, Bastien ROUCARIES wrote: > > I have also corrected a bug openat not testing NULL path. I return EFAULT > > like my Linux here. > > I disagree with this change. [...] > :), and we are not in a position to check for

Re: save-cwd.c:33:21: fatal error: xgetcwd.h: No such file or directory

2011-01-12 Thread Jim Meyering
Rob Vermaas wrote: > while building latest rcs revision we encountered a problem with > gnulib. The build fails with > > building save-cwd.o > gcc -std=gnu99 -std=gnu99 -DHAVE_CONFIG_H -I. -g -O2 -c -o > save-cwd.o save-cwd.c > save-cwd.c:33:21: fatal error: xgetcwd.h: No such file or directo

save-cwd.c:33:21: fatal error: xgetcwd.h: No such file or directory

2011-01-12 Thread Rob Vermaas
Hi, while building latest rcs revision we encountered a problem with gnulib. The build fails with building save-cwd.o gcc -std=gnu99 -std=gnu99 -DHAVE_CONFIG_H -I. -g -O2 -c -o save-cwd.o save-cwd.c save-cwd.c:33:21: fatal error: xgetcwd.h: No such file or directory compilation terminated