bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-classpath] [Bug classpath/22948] New: Infinite recursion in java.ni


From: pinskia at gcc dot gnu dot org
Subject: [bug-classpath] [Bug classpath/22948] New: Infinite recursion in java.nio.charset.*
Date: 26 Jul 2005 16:00:40 -0000

GNU Classpath falls into infinite recursion when "file.encoding" property is 
set to an encoding name other than ISO8859_1 family.



Below is the call chain.

java/nio/charset/Charset#forName

-> java/nio/charset/Charset#charsetForName

-> java/nio/charset/Charset#providers2

-> java/io/InputStreamReader#<init>

-> gnu/java/nio/charset/EncodingHelper#getCharset

-> java/nio/charset/Charset#forName

-> ...



For those who need to specify "file.encoding" property to handle their 
languages, this means even a single print(String) could cause stack overflow:

java/io/PrintStream#print

-> java/io/PrintStream#writeChars

-> java/lang/String#getBytes

-> java/nio/charset/Charset#forName

-> ...


------- Additional Comments From from-classpath at savannah dot gnu dot org  
2005-05-21 01:49 -------
I wasn't able to reproduce this. Could you give more details? Which VM?


------- Additional Comments From from-classpath at savannah dot gnu dot org  
2005-05-21 16:00 -------
I used the latest (05/20/2005) CVS version of Kaffe, which was configured with 
--without-classpath-gtk-awt on Linux 2.4.18.



My sample program was:



class Test {

  public static void main(String[] args) {

    System.out.println("hello");

  }

}



and my execution command was:



> kaffe -Dfile.encoding=EUCJP Test



If this is not a Classpath bug, I'll send this report to address@hidden
------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 
16:00 -------
This works for me on i686-pc-linux-gnu with the mainline GCJ.

-- 
           Summary: Infinite recursion in java.nio.charset.*
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: from-classpath at savannah dot gnu dot org
                CC: bug-classpath at gnu dot org


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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]