diff mbox

manual/memory.texi: Remove locale from muntrace's markings

Message ID 1425367714-17334-1-git-send-email-mashimiao.fnst@cn.fujitsu.com
State New
Headers show

Commit Message

Ma Shimiao March 3, 2015, 7:28 a.m. UTC
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
---
 ChangeLog          | 5 +++++
 manual/memory.texi | 8 ++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

Comments

Florian Weimer March 3, 2015, 10:20 a.m. UTC | #1
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.
Ma Shimiao March 4, 2015, 7:50 a.m. UTC | #2
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,
diff mbox

Patch

diff --git a/ChangeLog b/ChangeLog
index d59e1db..dfac126 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@ 
+2015-03-03  Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
+
+    * manual/memory.texi (muntrace): It actually does not have 
+	  locale problem.
+
 2015-03-02  Roland McGrath  <roland@hack.frob.com>
 
 	* sysdeps/pthread/timer_routines.c
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.
 
-@c muntrace @mtasurace:mtrace @mtslocale @asucorrupt @ascuheap @acucorrupt @acsmem @aculock @acsfd
+@c muntrace @mtasurace:mtrace @asucorrupt @ascuheap @acucorrupt @acsmem @aculock @acsfd
 @c  fprintf (fputs) dup @mtslocale @asucorrupt @ascuheap @acsmem @aculock @acucorrupt
 @c  fclose dup @ascuheap @asulock @aculock @acsmem @acsfd
 The @code{muntrace} function can be called after @code{mtrace} was used