This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/28059] codecvt locale facet is broken (reproducible crash)
- From: "rleigh at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2006 17:26:24 -0000
- Subject: [Bug libstdc++/28059] codecvt locale facet is broken (reproducible crash)
- References: <bug-28059-7852@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #19 from rleigh at debian dot org 2006-06-16 17:26 -------
Created an attachment (id=11683)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11683&action=view)
C example using mbsnrtowcs
This testcase is the same as the last, but uses C only.
It looks like this:
GCC ver powerpc i386
3.3 OK OK
3.4 OK OK
4.0 OK fail
4.1 OK fail
4.2 OK fail
The expected output is:
$ ./wide3
fffäß»
1
fffäß»
On i386 (all failing versions):
$ ./wide3
fffäß»
Segmentation fault
(gdb) run
Starting program: /home/rleigh/wide3
fffäß»
Program received signal SIGSEGV, Segmentation fault.
0xa7e0e19d in __gconv_transform_utf8_internal (step=0x805ede0,
data=0xafc2a8d0, inptrp=0xafc2aa80, inend=0x8048754 "", outbufstart=0x0,
irreversible=0xafc2a8f8, do_flush=0, consume_incomplete=1)
at ../iconv/loop.c:371
371 ../iconv/loop.c: No such file or directory.
in ../iconv/loop.c
(gdb) bt
#0 0xa7e0e19d in __gconv_transform_utf8_internal (step=0x805ede0,
data=0xafc2a8d0, inptrp=0xafc2aa80, inend=0x8048754 "", outbufstart=0x0,
irreversible=0xafc2a8f8, do_flush=0, consume_incomplete=1)
at ../iconv/loop.c:371
#1 0xa7e65bd9 in __mbsnrtowcs (dst=0xafc2a93c, src=0xafc2aa80, nmc=9,
len=162, ps=0xafc2aa84) at mbsnrtowcs.c:106
#2 0x08048503 in print_wide (str=0x804874b "fffä�237»") at wide3.c:16
#3 0x080485f0 in main () at wide3.c:40
Both the powerpc and i386 system are running the same version of glibc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28059