procenv cannot handle utf-8 chars when producing XML or JSON output
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
procenv |
Fix Released
|
High
|
James Hunt |
Bug Description
$ src/procenv --locale
locale:
LANG: fr_CA.UTF8
LANGUAGE: fr_FR
LC_ADDRESS: en_GB.UTF-8
LC_COLLATE: fr_CA.UTF8
LC_CTYPE: fr_FR.UTF-8
LC_IDENTIFICA
LC_MEASUREMENT: en_GB.UTF-8
LC_MESSAGES: fr_CA.UTF8
LC_MONETARY: en_GB.UTF-8
LC_NAME: en_GB.UTF-8
LC_NUMERIC: en_GB.UTF-8
LC_PAPER: en_GB.UTF-8
LC_TELEPHONE: en_GB.UTF-8
LC_TIME: en_GB.UTF-8
LC_ALL:
$ make check
:
:
INFO: Ensure /data/bzr/
INFO: Ensure --file=<file> works
INFO: Ensure --output=stdout works
INFO: Ensure --output=stderr works
INFO: Ensure --exec works
INFO: Ensure '--format=text' works
INFO: Ensure '--format=crumb' works
INFO: Ensure '--format=xml' works
*** Error in `/data/
FAIL: check_all_args
=======
1 of 3 tests failed
Please report to <email address hidden>
=======
Makefile:476: recipe for target 'check-TESTS' failed
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory '/data/
Makefile:599: recipe for target 'check-am' failed
make[1]: *** [check-am] Error 2
make[1]: Leaving directory '/data/
Makefile:427: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1
$ gdb src/procenv ./src/core.24767
GNU gdb (Ubuntu 7.7.1-0ubuntu2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://
Find the GDB manual and other documentation resources online at:
<http://
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from src/procenv...done.
[New LWP 24767]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_
Core was generated by `/data/
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f70a3eb6f79 in __GI_raise (sig=sig@entry=6) at ../nptl/
56 ../nptl/
(gdb) bt
#0 0x00007f70a3eb6f79 in __GI_raise (sig=sig@entry=6) at ../nptl/
#1 0x00007f70a3eba388 in __GI_abort () at abort.c:89
#2 0x00007f70a3ef41d4 in __libc_message (do_abort=1, fmt=fmt@
#3 0x00007f70a3f01d76 in malloc_printerr (ptr=0x134bc20, str=0x7f70a3ffeb84 "malloc(): memory corruption", action=<optimized out>) at malloc.c:4996
#4 _int_malloc (av=0x7f70a423f760 <main_arena>, bytes=300) at malloc.c:3447
#5 0x00007f70a3f035f0 in __GI___libc_malloc (bytes=300) at malloc.c:2891
#6 0x00007f70a3efdbef in __GI__IO_
#7 0x00007f70a3efc54c in __GI__IO_
#8 0x00007f70a3eca79a in _IO_vfprintf_
#9 0x00007f70a3f8b385 in __GI___
at vasprintf_chk.c:66
#10 0x00000000004041e0 in vasprintf (__ap=0x7fff5a6
#11 appendf (str=str@
#12 0x00000000004078ab in entry (name=name@
#13 0x0000000000417755 in show_signals () at procenv.c:1675
#14 0x0000000000418c0f in dump () at procenv.c:2956
#15 0x0000000000403587 in main (argc=2, argv=<optimized out>) at procenv.c:7143
Problem is that strerror(3) is returning utf-8 chars so procenv should convert all data to wchar_t.
Work around:
$ LANG=C make check
Related branches
Changed in procenv: | |
importance: | Undecided → High |
assignee: | nobody → James Hunt (jamesodhunt) |
status: | New → In Progress |
summary: |
- procenv cannot handle utf-8 chars when producing XML output + procenv cannot handle utf-8 chars when producing XML or JSON output |
Changed in procenv: | |
status: | In Progress → Fix Released |