Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 18 Dec 2014 20:13:24 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: Wrong wcsnrtombs return value and positive NaNs printing

* Oleg Ranevskyy <llvm.mail.list@...il.com> [2014-12-18 20:20:00 +0300]:
> I encountered two problems with musl when running the LLVM libc++ tests
> linked against it.
> 
> 1. The wcsnrtombs function returns the number of converted wide chars
> instead of the dst length in bytes. "cnt++;" at the of the function should
> actually be "cnt += l;".
> 

seems like a bug, yes

> 2. If a NaN value is printed by vfprintf and the MARK_POS flag is set to
> add '+' to positive values, musl doesn't add '+'. I found the following
> statement on the musl web page: "Quiet nans are treated equally (there is
> only one logical nan value, it is printed as "nan", the library does not
> care about the sign and payload of nan)". However, Linux libc adds '+',
> boost also has special support for this. Absence of the sign breaks one of
> the LLVM libc++ tests. Is this a subject for change?
> 

this is a bug, the printf spec requires the sign printed even for nan
(it will be always + in musl i guess)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.