Bug on Solaris

Martin Kahlert martin.kahlert@infineon.com
Tue Jan 8 07:08:00 GMT 2002


Hi Andrew,

On Tue, Jan 08, 2002 at 02:54:04PM +0000, Andrew Haley wrote:
> Did you do the *exact same thing* with the *exact same source* on both
> machines?
> 
> Andrew.

- My home dir is NFS mounted, so it's the same.
- The solaris machine is named ikarus, Linux is named keksy.

kahlert@ikarus:~/Hello> gcj -v
Reading specs from
/home/kahlert/GCC/lib/gcc-lib/sparc-sun-solaris2.7/3.1/specs
Reading specs from
/home/kahlert/GCC/lib/gcc-lib/sparc-sun-solaris2.7/3.1/../../../libgcj.spec
rename spec lib to liborig
Configured with: ../gcc-20011231/configure --prefix=/home/kahlert/GCC
--enable-languages=c++,f77,java --enable-threads=posix
--with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld
Thread model: posix
gcc version 3.1 20011231 (experimental)

kahlert@keksy:~/Hello> gcj -v
Reading specs from /sw/gcc-3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Reading specs from
/sw/gcc-3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../libgcj.spec
rename spec lib to liborig
Configured with: ../gcc-20011231/configure --prefix=/sw/gcc-3.1
--enable-languages=c++,f77,java --enable-threads=posix
Thread model: posix
gcc version 3.1 20011231 (experimental)

kahlert@ikarus:~/Hello> ll hello.java 
-rwxr-x---   1 kahlert       209 Jan  8 12:35 hello.java*

kahlert@keksy:~/Hello> ll hello.java 
-rwxr-x---    1 kahlert  titan         209 Jan  8 12:35 hello.java

kahlert@ikarus:~/Hello> gcj --encoding=UTF-8 -C hello.java
kahlert@ikarus:~/Hello> jcf-dump -c hello.class > solaris-c

kahlert@keksy:~/Hello> gcj --encoding=UTF-8 -C hello.java
kahlert@keksy:~/Hello> jcf-dump -c hello.class > linux-c
kahlert@keksy:~/Hello> diff -u linux-c solaris-c > disassembly.diff

I will attach the diff to this mail.

The only difference in the sources is the mentioned reorg.c patch.
I can run a new compilation on keksy, but that'll take a while.

Thanks,
Martin.

PS: If there would not be a firewall here, i would give you an xterm :-)

-- 
The early bird catches the worm. If you want something else for       
breakfast, get up later.
-------------- next part --------------
--- linux-c	Tue Jan  8 16:02:05 2002
+++ solaris-c	Tue Jan  8 16:01:26 2002
@@ -1,7 +1,7 @@
 Reading .class from hello.class.
 Magic number: 0xcafebabe, minor_version: 3, major_version: 45.
 
-Constant pool (count: 47):
+Constant pool (count: 45):
 #1: Utf8: "hello"
 #2: Class name: 1="hello"
 #3: Utf8: "java/lang/Object"
@@ -23,29 +23,28 @@
 #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"
+#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
@@ -56,35 +55,35 @@
 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
+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: 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
+ 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: 24
+  line: 6 at pc: 22
 
-Method name:"<init>" public Signature: 42=()void
+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 #44=<Method java.lang.Object.<init> ()void>
+  1: invokespecial #42=<Method java.lang.Object.<init> ()void>
   4: return
 
 Attributes (count: 1):
-Attribute "SourceFile", length:2, #46="hello.java"
+Attribute "SourceFile", length:2, #44="hello.java"


More information about the Java mailing list