bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: musl printf bugs


From: Bruno Haible
Subject: Re: musl printf bugs
Date: Sun, 17 Jun 2012 23:57:05 +0200
User-agent: KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; )

Rich Felker wrote:
> considering printf broken, and replacing printf
> because of this, is a big issue. Replacing printf is non-trivial

There is also another test that causes musl's printf to be overridden:

  checking whether printf supports the 'ls' directive... no

The test program exited with code 8, meaning that this test (from m4/printf.m4)
failed:

  /* Test whether precisions in %ls are supported as specified in ISO C 99
     section 7.19.6.1:
       "If a precision is specified, no more than that many bytes are written
        (including shift sequences, if any), and the array shall contain a
        null wide character if, to equal the multibyte character sequence
        length given by the precision, the function would need to access a
        wide character one past the end of the array."
     This test fails on Solaris 10.  */
  {
    static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
    buf[0] = '\0';
    if (sprintf (buf, "%.2ls", wstring) < 0
        || strcmp (buf, "ab") != 0)
      result |= 8;
  }

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]