public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/31939]  New: Command line arguments are byteswapped before being passed to the program runing in custom locale.
@ 2007-05-15 16:35 serg at vostok dot net
  2007-05-15 17:05 ` [Bug libgcj/31939] " serg at vostok dot net
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: serg at vostok dot net @ 2007-05-15 16:35 UTC (permalink / raw)
  To: java-prs

Conversion to UCS-2 encoding in GNU libiconv returns bytes in network
order. gcj wants to have them in host order. The hack in libgcj swaps bytes
when necessary. However, command line arguments slip by the swapper (or
go through it even number of times).

This produces unrecognizable for a program command line arguments. There is a
non-zero probability of this producing invalid UTF-16 strings, e.g. with
unpaired surrogates. That, in turn, may result in segmentation faults during
string operations, especially I/O character encoding conversion.


-- 
           Summary: Command line arguments are byteswapped before being
                    passed to the program runing in custom locale.
           Product: gcc
           Version: 4.1.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: serg at vostok dot net
 GCC build triplet: i386-portbld-freebsd6.2
  GCC host triplet: i386-portbld-freebsd6.2
GCC target triplet: i386-portbld-freebsd6.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31939


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-05-18 19:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-15 16:35 [Bug libgcj/31939] New: Command line arguments are byteswapped before being passed to the program runing in custom locale serg at vostok dot net
2007-05-15 17:05 ` [Bug libgcj/31939] " serg at vostok dot net
2007-05-15 17:11 ` serg at vostok dot net
2007-05-15 17:33 ` serg at vostok dot net
2007-05-18 19:07 ` serg at vostok dot net

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).