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 14:12:52 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Wrong wcsnrtombs return value and positive NaNs printing

On Thu, Dec 18, 2014 at 08:20:00PM +0300, Oleg Ranevskyy wrote:
> Hello musl community,
> 
> 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;".

This looks like you're correct, especially considering it's cnt+=l in
the first loop. I'll recheck it and fix if I confirm. Thanks.

> 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?

Based on my reading of the spec I think you're right that it should be
there. I can fix this.

Rich

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.