From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8027 invoked by alias); 15 May 2007 16:35:52 -0000 Received: (qmail 8008 invoked by uid 48); 15 May 2007 16:35:51 -0000 Date: Tue, 15 May 2007 16:35:00 -0000 Subject: [Bug libgcj/31939] New: Command line arguments are byteswapped before being passed to the program runing in custom locale. X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "serg at vostok dot net" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2007-q2/txt/msg00091.txt.bz2 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