From: Renlin Li <renlin.li@arm.com>
To: newlib@sourceware.org, vinschen@redhat.com,
Thomas Preud'homme <Thomas.Preudhomme@arm.com>
Subject: Re: Re: Fix modification of string literal by swprintf
Date: Wed, 14 Jun 2017 11:05:00 -0000 [thread overview]
Message-ID: <59411888.2040202@arm.com> (raw)
In-Reply-To: <20170609133236.GA26770@calimero.vinschen.de>
Hi there,
It seems this patch cause few regressions on arm/aarch64 baremetal targets.
libstdc++-v3:
FAIL: 21_strings/basic_string/numeric_conversions/wchar_t/dr1261.cc execution test
FAIL: 21_strings/basic_string/numeric_conversions/wchar_t/stof.cc execution test
FAIL: 21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc execution test
FAIL: 27_io/basic_ostream/inserters_arithmetic/wchar_t/4402.cc execution test
newlib:
FAIL: newlib.stdio/swprintf.c execution
Regards,
Renlin
On 09/06/17 14:32, Corinna Vinschen wrote:
> On Jun 8 13:15, Thomas Preudhomme wrote:
>> Please find his updated patch attached.
>>
>> Best regards,
>>
>> Thomas
>
>> >From ee96a273969b0bccd308b81bcdf37a6fdefa06f6 Mon Sep 17 00:00:00 2001
>> From: Silviu Baranga <silviu.baranga@arm.cm>
>> Date: Mon, 5 Jun 2017 09:54:42 +0100
>> Subject: [PATCH] Don't overread or write memory returned by _DTOA_R
>>
>> Don't over-read memory returned by _DTOA_R, and never write to it
>> since the result might be a string literal.
>>
>> For example, when doing:
>> swprintf(tt, 20, L"%.*f", 6, 0.0);
>>
>> we will get back "0".
>>
>> Instead, write the result returned by _DTOA_R to the output buffer.
>> After this, write the 0 chars directly to the the output buffer
>> (if there are any). This also has the (marginal) advantage that
>> we read/write less memory overall.
>
> Pushed.
>
>
> Thanks,
> Corinna
>
next prev parent reply other threads:[~2017-06-14 11:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-05 8:59 Thomas Preudhomme
2017-06-07 10:02 ` Corinna Vinschen
2017-06-07 10:41 ` Thomas Preudhomme
2017-06-08 12:15 ` Thomas Preudhomme
2017-06-09 13:32 ` Corinna Vinschen
2017-06-14 11:05 ` Renlin Li [this message]
2017-06-15 8:01 ` Thomas Preudhomme
2017-06-15 9:05 ` Renlin Li
2017-06-19 10:58 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59411888.2040202@arm.com \
--to=renlin.li@arm.com \
--cc=Thomas.Preudhomme@arm.com \
--cc=newlib@sourceware.org \
--cc=vinschen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).