[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dd.c crash coreutils-5.97
From: |
Martin Ellis |
Subject: |
Re: dd.c crash coreutils-5.97 |
Date: |
Thu, 14 Sep 2006 18:12:44 +0100 |
User-agent: |
KMail/1.9.1 |
[ Apologies if this doesn't thread correctly - I'm not subscribed, so can't
just hit reply. Please CC any replies. ]
Regarding this backtrace:
http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00017.html
FWIW, my backup script was failing, so I looked into this today:
From around line 550 of dd.c:
fprintf (stderr,
ngettext ("1 byte (1 B) copied",
"%"PRIuMAX" bytes (%s) copied",
MIN (w_bytes, ULONG_MAX)),
w_bytes,
human_readable (w_bytes, hbuf, human_opts, 1, 1));
The problem is that, if the locale matching $LANG has been built
(for me that's en_GB.UTF-8), then ngettext appears to return something of
the form:
%<PRIuMAX> bytes (%s) copied
(To be honest, although I see what's causing the crash, I'm not sure
why the string looks exactly like that)
This string is then passed as the format to fprintf - where %<PRIuMAX>
should be something like %llu.
I'm working around it by using "unset LANG" before the backup
script is run.
Cheers,
Martin
- Re: dd.c crash coreutils-5.97,
Martin Ellis <=