[uClibc 0001884]: printf() field-width limit is unacceptable
bugs at busybox.net
bugs at busybox.net
Fri Jan 4 15:46:57 UTC 2008
The following issue has been SUBMITTED.
======================================================================
http://busybox.net/bugs/view.php?id=1884
======================================================================
Reported By: michael_d
Assigned To: uClibc
======================================================================
Project: uClibc
Issue ID: 1884
Category: Stdio
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
======================================================================
Date Submitted: 01-04-2008 07:46 PST
Last Modified: 01-04-2008 07:46 PST
======================================================================
Summary: printf() field-width limit is unacceptable
Description:
Uclibc includes code that tries to protect printf against large output
widths.
This code presents a problem, as it causes a spurious test failure in
coreutils-6.9, specifically the test du/deref-args. While the feature
that test is actually challenging is irrelevant to printf, it tries to
create a 64k file with the command "printf %65536s x > 64k". Bash's
printf builtin evidently punts to uClibc in this case, which silently
treats the command as %6553s, producing a file of the wrong size.
It's even worse in the current alpha coreutils-6.9.91. Among other test
failures I haven't looked into yet, it has one test,
"misc/printf-suprise", which verifies that "%20000000f" works under an
rlimit constraint of 10000k. (Although you can weasel out of that one by
arranging for printf() to return nonzero when overloaded.)
I don't have a fix, save simply diking out the MAX_FIELD_WIDTH check.
Note that coreutils-6.9 will show other test failures due to issue
http://busybox.net/bugs/view.php?id=1869.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
01-04-08 07:46 michael_d New Issue
01-04-08 07:46 michael_d Status new => assigned
01-04-08 07:46 michael_d Assigned To => uClibc
======================================================================
More information about the uClibc-cvs
mailing list