Bug on Solaris

Martin Kahlert martin.kahlert@infineon.com
Tue Jan 8 03:39:00 GMT 2002


Hi Andrew,

On Tue, Jan 08, 2002 at 11:24:46AM +0000, Andrew Haley wrote:
> decompile the .class file generated by Solaris and Linux.  Decompile
> also Double.class on Solaris and Linux.

$ cat hello.java
public class hello
{
 public static void main(String[] args)
    {
     System.out.println("Double.MIN_VALUE = " + Double.MIN_VALUE);
     System.out.println("Double.MAX_VALUE = " + Double.MAX_VALUE);
    }
}

I append the decompiled (i assume, you meant the output of jcf-dump -c) to
this mail.

Thanks for your help,
Martin.

-- 
The early bird catches the worm. If you want something else for       
breakfast, get up later.
-------------- next part --------------
Reading .class from hello.class.
Magic number: 0xcafebabe, minor_version: 3, major_version: 45.

Constant pool (count: 47):
#1: Utf8: "hello"
#2: Class name: 1="hello"
#3: Utf8: "java/lang/Object"
#4: Class name: 3="java/lang/Object"
#5: Utf8: "main"
#6: Utf8: "([Ljava/lang/String;)V"
#7: Utf8: "Code"
#8: Utf8: "java/lang/System"
#9: Class name: 8="java/lang/System"
#10: Utf8: "out"
#11: Utf8: "Ljava/io/PrintStream;"
#12: NameAndType name: 10=out, signature: 11=java.io.PrintStream
#13: Fieldref class: 9=java.lang.System name_and_type: 12=<out java.io.PrintStream>
#14: Utf8: "java/lang/StringBuffer"
#15: Class name: 14="java/lang/StringBuffer"
#16: Utf8: "Double.MIN_VALUE = "
#17: String 16="Double.MIN_VALUE = "
#18: Utf8: "<init>"
#19: Utf8: "(Ljava/lang/String;)V"
#20: NameAndType name: 18=<init>, signature: 19=(java.lang.String)void
#21: Methodref class: 15=java.lang.StringBuffer name_and_type: 20=<<init> (java.lang.String)void>
#22: Double 4.9406564584124654418e-324, bits = 0x0000000000000001
#24: Utf8: "append"
#25: Utf8: "(D)Ljava/lang/StringBuffer;"
#26: NameAndType name: 24=append, signature: 25=(double)java.lang.StringBuffer
#27: Methodref class: 15=java.lang.StringBuffer name_and_type: 26=<append (double)java.lang.StringBuffer>
#28: Utf8: "toString"
#29: Utf8: "()Ljava/lang/String;"
#30: NameAndType name: 28=toString, signature: 29=()java.lang.String
#31: Methodref class: 15=java.lang.StringBuffer name_and_type: 30=<toString ()java.lang.String>
#32: Utf8: "java/io/PrintStream"
#33: Class name: 32="java/io/PrintStream"
#34: Utf8: "println"
#35: NameAndType name: 34=println, signature: 19=(java.lang.String)void
#36: Methodref class: 33=java.io.PrintStream name_and_type: 35=<println (java.lang.String)void>
#37: Utf8: "Double.MAX_VALUE = "
#38: String 37="Double.MAX_VALUE = "
#39: Double 1.7976931348623157081e+308, bits = 0x7fefffffffffffff
#41: Utf8: "LineNumberTable"
#42: Utf8: "()V"
#43: NameAndType name: 18=<init>, signature: 42=()void
#44: Methodref class: 4=java.lang.Object name_and_type: 43=<<init> ()void>
#45: Utf8: "SourceFile"
#46: Utf8: "hello.java"

Access flags: 0x21 public super
This class: 2=hello, super: 4=java.lang.Object
Interfaces (count: 0):

Fields (count: 0):

Methods (count: 2):

Method name:"main" public static Signature: 6=(java.lang.String[])void
Attribute "Code", length:77, max_stack:4, max_locals:1, code_length:49
  0: getstatic #13=<Field java.lang.System.out java.io.PrintStream>
  3: new #15=<Class java.lang.StringBuffer>
  6: dup
  7: ldc #17=<String "Double.MIN_VALUE = ">
  9: invokespecial #21=<Method java.lang.StringBuffer.<init> (java.lang.String)void>
 12: ldc2_w #22=<Double 4.9406564584124654418e-324>
 15: invokevirtual #27=<Method java.lang.StringBuffer.append (double)java.lang.StringBuffer>
 18: invokevirtual #31=<Method java.lang.StringBuffer.toString ()java.lang.String>
 21: invokevirtual #36=<Method java.io.PrintStream.println (java.lang.String)void>
 24: getstatic #13=<Field java.lang.System.out java.io.PrintStream>
 27: new #15=<Class java.lang.StringBuffer>
 30: dup
 31: ldc #38=<String "Double.MAX_VALUE = ">
 33: invokespecial #21=<Method java.lang.StringBuffer.<init> (java.lang.String)void>
 36: ldc2_w #39=<Double 1.7976931348623157081e+308>
 39: invokevirtual #27=<Method java.lang.StringBuffer.append (double)java.lang.StringBuffer>
 42: invokevirtual #31=<Method java.lang.StringBuffer.toString ()java.lang.String>
 45: invokevirtual #36=<Method java.io.PrintStream.println (java.lang.String)void>
 48: return
Attribute "LineNumberTable", length:10, count: 2
  line: 5 at pc: 0
  line: 6 at pc: 24

Method name:"<init>" public Signature: 42=()void
Attribute "Code", length:17, max_stack:1, max_locals:1, code_length:5
  0: aload_0
  1: invokespecial #44=<Method java.lang.Object.<init> ()void>
  4: return

Attributes (count: 1):
Attribute "SourceFile", length:2, #46="hello.java"
-------------- next part --------------
Reading .class from hello.class.
Magic number: 0xcafebabe, minor_version: 3, major_version: 45.

Constant pool (count: 45):
#1: Utf8: "hello"
#2: Class name: 1="hello"
#3: Utf8: "java/lang/Object"
#4: Class name: 3="java/lang/Object"
#5: Utf8: "main"
#6: Utf8: "([Ljava/lang/String;)V"
#7: Utf8: "Code"
#8: Utf8: "java/lang/System"
#9: Class name: 8="java/lang/System"
#10: Utf8: "out"
#11: Utf8: "Ljava/io/PrintStream;"
#12: NameAndType name: 10=out, signature: 11=java.io.PrintStream
#13: Fieldref class: 9=java.lang.System name_and_type: 12=<out java.io.PrintStream>
#14: Utf8: "java/lang/StringBuffer"
#15: Class name: 14="java/lang/StringBuffer"
#16: Utf8: "Double.MIN_VALUE = "
#17: String 16="Double.MIN_VALUE = "
#18: Utf8: "<init>"
#19: Utf8: "(Ljava/lang/String;)V"
#20: NameAndType name: 18=<init>, signature: 19=(java.lang.String)void
#21: Methodref class: 15=java.lang.StringBuffer name_and_type: 20=<<init> (java.lang.String)void>
#22: Utf8: "append"
#23: Utf8: "(D)Ljava/lang/StringBuffer;"
#24: NameAndType name: 22=append, signature: 23=(double)java.lang.StringBuffer
#25: Methodref class: 15=java.lang.StringBuffer name_and_type: 24=<append (double)java.lang.StringBuffer>
#26: Utf8: "toString"
#27: Utf8: "()Ljava/lang/String;"
#28: NameAndType name: 26=toString, signature: 27=()java.lang.String
#29: Methodref class: 15=java.lang.StringBuffer name_and_type: 28=<toString ()java.lang.String>
#30: Utf8: "java/io/PrintStream"
#31: Class name: 30="java/io/PrintStream"
#32: Utf8: "println"
#33: NameAndType name: 32=println, signature: 19=(java.lang.String)void
#34: Methodref class: 31=java.io.PrintStream name_and_type: 33=<println (java.lang.String)void>
#35: Utf8: "Double.MAX_VALUE = "
#36: String 35="Double.MAX_VALUE = "
#37: Double 4.9406564584124654418e-324, bits = 0x0000000000000001
#39: Utf8: "LineNumberTable"
#40: Utf8: "()V"
#41: NameAndType name: 18=<init>, signature: 40=()void
#42: Methodref class: 4=java.lang.Object name_and_type: 41=<<init> ()void>
#43: Utf8: "SourceFile"
#44: Utf8: "hello.java"

Access flags: 0x21 public super
This class: 2=hello, super: 4=java.lang.Object
Interfaces (count: 0):

Fields (count: 0):

Methods (count: 2):

Method name:"main" public static Signature: 6=(java.lang.String[])void
Attribute "Code", length:75, max_stack:4, max_locals:1, code_length:47
  0: getstatic #13=<Field java.lang.System.out java.io.PrintStream>
  3: new #15=<Class java.lang.StringBuffer>
  6: dup
  7: ldc #17=<String "Double.MIN_VALUE = ">
  9: invokespecial #21=<Method java.lang.StringBuffer.<init> (java.lang.String)void>
 12: dconst_0
 13: invokevirtual #25=<Method java.lang.StringBuffer.append (double)java.lang.StringBuffer>
 16: invokevirtual #29=<Method java.lang.StringBuffer.toString ()java.lang.String>
 19: invokevirtual #34=<Method java.io.PrintStream.println (java.lang.String)void>
 22: getstatic #13=<Field java.lang.System.out java.io.PrintStream>
 25: new #15=<Class java.lang.StringBuffer>
 28: dup
 29: ldc #36=<String "Double.MAX_VALUE = ">
 31: invokespecial #21=<Method java.lang.StringBuffer.<init> (java.lang.String)void>
 34: ldc2_w #37=<Double 4.9406564584124654418e-324>
 37: invokevirtual #25=<Method java.lang.StringBuffer.append (double)java.lang.StringBuffer>
 40: invokevirtual #29=<Method java.lang.StringBuffer.toString ()java.lang.String>
 43: invokevirtual #34=<Method java.io.PrintStream.println (java.lang.String)void>
 46: return
Attribute "LineNumberTable", length:10, count: 2
  line: 5 at pc: 0
  line: 6 at pc: 22

Method name:"<init>" public Signature: 40=()void
Attribute "Code", length:17, max_stack:1, max_locals:1, code_length:5
  0: aload_0
  1: invokespecial #42=<Method java.lang.Object.<init> ()void>
  4: return

Attributes (count: 1):
Attribute "SourceFile", length:2, #44="hello.java"


More information about the Java mailing list