This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] manual/memory.texi: Remove locale from muntrace's markings
- From: Ma Shimiao <mashimiao dot fnst at cn dot fujitsu dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 4 Mar 2015 15:50:49 +0800
- Subject: Re: [PATCH] manual/memory.texi: Remove locale from muntrace's markings
- Authentication-results: sourceware.org; auth=none
- References: <1425367714-17334-1-git-send-email-mashimiao dot fnst at cn dot fujitsu dot com> <54F58B08 dot 7020306 at redhat dot com>
On 03/03/2015 06:20 PM, Florian Weimer wrote:
> On 03/03/2015 08:28 AM, Ma Shimiao wrote:
>> diff --git a/manual/memory.texi b/manual/memory.texi
>> index 0729e70..a77c2dc 100644
>> --- a/manual/memory.texi
>> +++ b/manual/memory.texi
>> @@ -1700,9 +1700,13 @@ systems. The prototype can be found in @file{mcheck.h}.
>> @comment mcheck.h
>> @comment GNU
>> @deftypefun void muntrace (void)
>> -@safety{@prelim{}@mtunsafe{@mtasurace{:mtrace} @mtasuconst{:malloc_hooks} @mtslocale{}}@asunsafe{@asucorrupt{} @ascuheap{}}@acunsafe{@acucorrupt{} @acsmem{} @aculock{} @acsfd{}}}
>> +@safety{@prelim{}@mtunsafe{@mtasurace{:mtrace} @mtasuconst{:malloc_hooks}}@asunsafe{@asucorrupt{} @ascuheap{}}@acunsafe{@acucorrupt{} @acsmem{} @aculock{} @acsfd{}}}
>> +@c As we know, only if we passes custom string format or format which
>> +@c contains single quota to fprintf(), locale problem will occur.
>> +@c Though calls function fprintf(), muntrace() will not execute the
>> +@c area which causes locale problem.
>
> The locale dependency is also exposed by floating point formatting (%f
> for example) because the decimal separator is not always a point. So I
> think your new comment is misleading.
>
Ah.., It seems it's my miss.
I reread the source of fprintf(), it calls printf_fp() to deal with floating
point formatting. printf_fp() can cause locale problem.
Am I right?
Best regards,
--
Ma Shimiao
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)