From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6727 Path: news.gmane.org!not-for-mail From: Oleg Ranevskyy Newsgroups: gmane.linux.lib.musl.general Subject: Wrong wcsnrtombs return value and positive NaNs printing Date: Thu, 18 Dec 2014 20:20:00 +0300 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1139680c53620c050a80cd48 X-Trace: ger.gmane.org 1418923223 25555 80.91.229.3 (18 Dec 2014 17:20:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Dec 2014 17:20:23 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6740-gllmg-musl=m.gmane.org@lists.openwall.com Thu Dec 18 18:20:16 2014 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Y1ekI-0004nq-7y for gllmg-musl@m.gmane.org; Thu, 18 Dec 2014 18:20:14 +0100 Original-Received: (qmail 32727 invoked by uid 550); 18 Dec 2014 17:20:12 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32719 invoked from network); 18 Dec 2014 17:20:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=5zrrYkFBDE00wpvDKskQ5lA3rs3to2K80RU9a2wP3VY=; b=GG52VucJ1d0PHSBluiLvLFI3x7siH/6dR/JNacBHANW5GEyJILgJPstND+ruOXxWwI 5uqhI17U4lkSoIL8y5oKq94v2VUYcNrOz221NBH5hlqt1NdzrjlpAlsEAJjBvhMziLSA 0gaHvi4H9jYwL9PFcuIW5gsyXvlGWSByjgfuxpq+37jqxrn2xvz32ZyxUWoZprHwAVaA vNWowvCkHraAOr+2NQ5EY1dTcnx8TDeIbmmv7GubD787sdr1lKTIYTKfURebwtHZCjCG Mwp0DNQGvRqri2bWXopsvbJLEQQmhksE9UpQCWJwJLRXwC5dOzLPuzxfG1rEJ/mVXElU 9SaA== X-Received: by 10.170.190.203 with SMTP id h194mr3185049yke.16.1418923200437; Thu, 18 Dec 2014 09:20:00 -0800 (PST) Xref: news.gmane.org gmane.linux.lib.musl.general:6727 Archived-At: --001a1139680c53620c050a80cd48 Content-Type: text/plain; charset=UTF-8 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;". 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? Would you be able to kindly review these findings and share your opinion please? Thanks in advance. Warm regards, Oleg --001a1139680c53620c050a80cd48 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 co= nverted wide chars instead of the dst length in bytes. "cnt++;" a= t the of the function should actually be "cnt +=3D l;".

2. If a NaN value is printed by vfprintf and the MARK_POS f= lag 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 logi= cal nan value, it is printed as "nan", the library does not care = about the sign and payload of nan)". However, Linux libc adds &= #39;+', boost also has special support for this. Absence of the sign br= eaks one of the LLVM libc++ tests. Is this a subject for change?
=
Would you be able to kindly review these findings and share = your opinion please?

Thanks in advance.
= Warm regards,
Oleg
--001a1139680c53620c050a80cd48--