Summary: | incompatible type on stack | ||
---|---|---|---|
Product: | gcc | Reporter: | mwteng |
Component: | java | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs, java-prs, mwteng, tromey |
Priority: | P2 | ||
Version: | 3.4.1 | ||
Target Milestone: | 4.0.0 | ||
Host: | RedHat 9 | Target: | RedHat 9 |
Build: | RedHat 9 | Known to work: | |
Known to fail: | Last reconfirmed: | ||
Attachments: |
pkg-16653.tar.gz
output.txt gcj-xercesImpl-output.txt jcf-dump-xercesImpl-output.txt SegFault-compile-with-jar-output.txt |
Description
mwteng
2004-07-21 06:22:43 UTC
Do you know if you run with gij (the interrupter) if it works? Also you attach the files using the web interface referenced in the URL below. (In reply to comment #0) > When try running the binary, its failed with ... > org.apache.xercs.parsers.XML11Configuration::configureXML11Pipeline(()V): > incompatible type on stack ... You mean when you execute "a.out", right? This looks like a bytecode verification error... > The way in which the application is built are: > (1) convert two required xml parser jar to object for linking... > e.g. gcj -c -O2 xmlParserAPIs.jar This is a weird usage...you can just specify xmlParserAPIs.jar on the next GCJ command line... > (2) compile the application source and link with those libraries. > e.g. gcj -O2 --main=Main Main.java xmlParserAPIs.o xercesImpl.o > > BTW, I could like to know how to submit a complete report for investigation. You can help by running GCJ's "jcf-dump" (or JDK's "javap") on the class "org.apache.xerces.parsers.XML11Configuration" and pasting the output for the method "configureXML11Pipeline" - do make sure to have the relevant JARs in your CLASSPATH when you run this. For example (on Linux): jcf-dump --classpath xmlParserAPIs.jar -c org.apache.xerces.parsers.XML11Configuration >foo.txt (Note the "-c" flag.) Open "foo.txt" and copy the method body for "configureXML11Pipeline" into this bug report. (In reply to comment #1) > Do you know if you run with gij (the interrupter) if it works? > Also you attach the files using the web interface referenced in the URL below. I have no idea will it run with gij and how I should make it run with it. BTW, I failed to attach the complete source and libraries for your invesitgation via GCC Bugzilla...it always responded with "You did not specify a file to attach". Thus I will send to you directly in separate email. Subject: RE: incompatible type on stack I have no idea will it run with gij and how I should make it run with it. BTW, I failed to attach the complete source and libraries for your invesitgation via GCC Bugzilla...it always responded with "You did not specify a file to attach". Thus I will send to you directly in separate email. >From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> >Reply-To: gcc-bugzilla@gcc.gnu.org >To: mwteng@hotmail.com >Subject: [Bug java/16653] incompatible type on stack >Date: 21 Jul 2004 07:15:41 -0000 > >------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-21 >07:15 ------- >Do you know if you run with gij (the interrupter) if it works? >Also you attach the files using the web interface referenced in the URL >below. > >-- > > >http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653 > >------- You are receiving this mail because: ------- >You reported the bug, or are watching the reporter. >You are on the CC list for the bug, or are watching someone who is. _________________________________________________________________ Get 10mb of inbox space with MSN Hotmail Extra Storage http://join.msn.com/?pgmarket=en-sg Created attachment 6790 [details]
pkg-16653.tar.gz
Created attachment 6791 [details]
output.txt
(In reply to comment #2) > (In reply to comment #0) > > When try running the binary, its failed with ... > > org.apache.xercs.parsers.XML11Configuration::configureXML11Pipeline(()V): > > incompatible type on stack ... > You mean when you execute "a.out", right? > This looks like a bytecode verification error... > > The way in which the application is built are: > > (1) convert two required xml parser jar to object for linking... > > e.g. gcj -c -O2 xmlParserAPIs.jar > This is a weird usage...you can just specify xmlParserAPIs.jar > on the next GCJ command line... > > (2) compile the application source and link with those libraries. > > e.g. gcj -O2 --main=Main Main.java xmlParserAPIs.o xercesImpl.o > > > > BTW, I could like to know how to submit a complete report for investigation. > You can help by running GCJ's "jcf-dump" (or JDK's "javap") on > the class "org.apache.xerces.parsers.XML11Configuration" and pasting > the output for the method "configureXML11Pipeline" - do make sure > to have the relevant JARs in your CLASSPATH when you run this. For > example (on Linux): > jcf-dump --classpath xmlParserAPIs.jar -c > org.apache.xerces.parsers.XML11Configuration >foo.txt > (Note the "-c" flag.) > Open "foo.txt" and copy the method body for "configureXML11Pipeline" > into this bug report. No, I am running an executable name 'main'. The simple program needs xml parser and we are using xmlParserAPIs.jar and xercesImpl.jar. However, I failed to build the simple program without converting the two jars into object file. ------------------------- Below is the compilation and run detail ------------ gcj -v -g -O2 --main=Main -o main \ alpha/LowerCase.java alpha/UpperCase.java alpha/one/LowerCase.java alpha/two/UpperCase.java beta/LowerCase.java beta/UpperCase.java beta/one/LowerCase.java beta/two/UpperCase.java xmlvalidator/xmlvalidator01.java Main.java \ lib/xmlParserAPIs.o lib/xercesImpl.o Reading specs from /opt/gcc-3.4.1/bin/../lib/gcc/i686-pc-linux-gnu/3.4.1/specs Reading specs from /opt/gcc-3.4.1/bin/../lib/gcc/i686-pc-linux- gnu/3.4.1/../../../libgcj.spec rename spec lib to liborig Configured with: ./configure --prefix=/opt Thread model: posix gcc version 3.4.1 /opt/gcc-3.4.1/bin/../libexec/gcc/i686-pc-linux- gnu/3.4.1/jc1 /tmp/ccfUtvVjjx -fhash-synchronization -fno-use-divide- subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions - quiet -dumpbase ccfUtvVjjx -mtune=pentiumpro -auxbase ccfUtvVjjx -g -O2 - version -ffilelist-file -o /tmp/cc0lRYQt.s GNU Java version 3.4.1 (i686-pc-linux-gnu) compiled by GNU C version 3.2.2 20030222 (Red Hat Linux 3.2.2-5). GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31906 Class path starts here: ./ /mnt/hgfs/cbr-deploy-lib/activation.jar/ (zip) /mnt/hgfs/cbr-deploy-lib/jh.jar/ (zip) /mnt/hgfs/cbr-deploy-lib/mailapi.jar/ (zip) /mnt/hgfs/cbr-deploy-lib/xmlParserAPIs.jar/ (zip) /mnt/hgfs/cbr-deploy-lib/jaxp.jar/ (zip) /mnt/hgfs/cbr-deploy-lib/parser.jar/ (zip) /mnt/hgfs/cbr-deploy-lib/xercesImpl.jar/ (zip) /opt/gcc-3.4.1/bin/../lib/gcc/../../share/java/libgcj-3.4.1.jar/ (system) (zip) as -V -Qy -o /tmp/ccoyyzOj.o /tmp/cc0lRYQt.s GNU assembler version 2.13.90.0.18 (i386-redhat-linux) using BFD version 2.13.90.0.18 20030206 /opt/gcc-3.4.1/bin/../libexec/gcc/i686-pc-linux-gnu/3.4.1/jvgenmain Mainmain /tmp/ccWnJomg.i /opt/gcc-3.4.1/bin/../libexec/gcc/i686-pc-linux- gnu/3.4.1/cc1 /tmp/ccWnJomg.i -quiet -dumpbase Mainmain.c -mtune=pentiumpro - g -O2 -version -fdollars-in-identifiers -o /tmp/cc0lRYQt.s GNU C version 3.4.1 (i686-pc-linux-gnu) compiled by GNU C version 3.2.2 20030222 (Red Hat Linux 3.2.2-5). GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31906 as -V -Qy -o /tmp/ccOZFmDd.o /tmp/cc0lRYQt.s GNU assembler version 2.13.90.0.18 (i386-redhat-linux) using BFD version 2.13.90.0.18 20030206 /opt/gcc-3.4.1/bin/../libexec/gcc/i686-pc-linux-gnu/3.4.1/collect2 --eh-frame- hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o main /usr/lib/crt1.o /usr/lib/crti.o /opt/gcc-3.4.1/bin/../lib/gcc/i686-pc- linux-gnu/3.4.1/crtbegin.o -L/opt/gcc-3.4.1/bin/../lib/gcc/i686-pc-linux- gnu/3.4.1 -L/opt/gcc-3.4.1/bin/../lib/gcc -L/opt/gcc-3.4.1/bin/../lib/gcc/i686- pc-linux-gnu/3.4.1/../../.. /tmp/ccOZFmDd.o lib/xmlParserAPIs.o lib/xercesImpl.o /tmp/ccoyyzOj.o -lgcc_s -lgcc -lgcj -lm -lpthread -ldl - lgcc_s -lgcc -lc -lgcc_s -lgcc /opt/gcc-3.4.1/bin/../lib/gcc/i686-pc-linux- gnu/3.4.1/crtend.o /usr/lib/crtn.o [Alpha.two]SOMESTRING [Alpha.one]somestring XML File: /mnt/hgfs/share/casebase.xml Exception in thread "main" java.lang.VerifyError: verification failed at PC 236 in org.apache.xerces.parsers.XML11Configuration:configureXML11Pipeline(() V): incompatible type on stack at _Jv_BytecodeVerifier.verify_fail(byte, int) (/opt/gcc- 3.4.1/lib/libgcj.so.5.0.0) at _Jv_BytecodeVerifier.pop_init_ref(_Jv_BytecodeVerifier.type) (/opt/gcc- 3.4.1/lib/libgcj.so.5.0.0) at _Jv_BytecodeVerifier.verify_instructions_0() (/opt/gcc- 3.4.1/lib/libgcj.so.5.0.0) at _Jv_VerifyMethod(_Jv_InterpMethod) (/opt/gcc-3.4.1/lib/libgcj.so.5.0.0) at _Jv_PrepareClass(java.lang.Class) (/opt/gcc-3.4.1/lib/libgcj.so.5.0.0) at _Jv_WaitForState(java.lang.Class, int) (/opt/gcc- 3.4.1/lib/libgcj.so.5.0.0) at java.lang.VMClassLoader.linkClass0(java.lang.Class) (/opt/gcc- 3.4.1/lib/libgcj.so.5.0.0) at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/opt/gcc- 3.4.1/lib/libgcj.so.5.0.0) at java.lang.Class.initializeClass() (/opt/gcc-3.4.1/lib/libgcj.so.5.0.0) at java.lang.Class.newInstance() (/opt/gcc-3.4.1/lib/libgcj.so.5.0.0) at org.apache.xerces.util.ObjectFactory.newInstance(java.lang.String, java.lang.ClassLoader) (Unknown Source) at org.apache.xerces.util.ObjectFactory.createObject(java.lang.String, java.lang.String, java.lang.String) (Unknown Source) at org.apache.xerces.util.ObjectFactory.createObject(java.lang.String, java.lang.String) (Unknown Source) at org.apache.xerces.parsers.DOMParser.DOMParser() (Unknown Source) at xmlvalidator.xmlvalidator01.parseDocument(java.lang.String) (/home/mwteng/jbproject/alpha/src/xmlvalidator/xmlvalidator01.java:75) at xmlvalidator.xmlvalidator01.xmlvalidator01(java.lang.String) (/home/mwteng/jbproject/alpha/src/xmlvalidator/xmlvalidator01.java:45) at Main.xml(java.lang.String) (/home/mwteng/jbproject/alpha/src/Main.java:31) at Main.main(java.lang.String[]) (/home/mwteng/jbproject/alpha/src/Main.java:37) > I have no idea will it run with gij and how I should make it run with it.
You run "gij" just like you run "java" from the JDK/JRE.
Run "gij --help" for help on the options (you will just
need to use the --classpath option).
Exactly which version of Xerces are you using?
For this particular case can you please attach the
output of running:
jcf-dump -c --classpath xercesImpl.jar org.apache.xerces.parsers.XML11Configuration
(redirected, of course, to a file that you can upload)?
(In reply to comment #8) > > I have no idea will it run with gij and how I should make it run with it. > You run "gij" just like you run "java" from the JDK/JRE. > Run "gij --help" for help on the options (you will just > need to use the --classpath option). > Exactly which version of Xerces are you using? > For this particular case can you please attach the > output of running: > jcf-dump -c --classpath xercesImpl.jar org.apache.xerces.parsers.XML11Configuration > (redirected, of course, to a file that you can upload)? Yup... I could run the application with java and gij. ... Thanks. As for the jcf-dump ...ing, its failed with file not found. By unjaring the xercesImpl.jar... I could not see that file too. Surprise... why during runtime it being asked. BTW, I don't know the version of the jar and it was bundle in subdir 'lib' of package pkg-16653.tar.gz. (In reply to comment #8) > > I have no idea will it run with gij and how I should make it run with it. > You run "gij" just like you run "java" from the JDK/JRE. > Run "gij --help" for help on the options (you will just > need to use the --classpath option). > Exactly which version of Xerces are you using? > For this particular case can you please attach the > output of running: > jcf-dump -c --classpath xercesImpl.jar org.apache.xerces.parsers.XML11Configuration > (redirected, of course, to a file that you can upload)? Based on my last reply ... I couldn't find the XML11Configuration file. With the new downloaded copy of xerces-j-2.6.2. I managed to perform the jcf- dump (file: jcf-dump-xercesImpl-output.txt). However, it failed during compilation (e.g. gcj -c xercesImpl.jar) and the error can be found in file 'gcj-xercesImpl-output.txt). The mentioned two output files will be forwarded to you in separated email...again I failed to attached them from here... Subject: RE: incompatible type on stack Hi Mathew, The attachment are the output of action done on xerces-j-2.6.2 version package: (1) gcj-xeresImpl-output.txt => compiling xercesImpl.jar failure output using gcj (2) jcf-dump-xercesImpl-output.txt => jcf dumping of the xercesImpl.jar Regards, Meng Wah >From: "rmathew at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> >Reply-To: gcc-bugzilla@gcc.gnu.org >To: mwteng@hotmail.com >Subject: [Bug java/16653] incompatible type on stack >Date: 21 Jul 2004 11:40:51 -0000 > >------- Additional Comments From rmathew at gcc dot gnu dot org 2004-07-21 >11:40 ------- > > I have no idea will it run with gij and how I should make it run with >it. > >You run "gij" just like you run "java" from the JDK/JRE. > >Run "gij --help" for help on the options (you will just >need to use the --classpath option). > >Exactly which version of Xerces are you using? > >For this particular case can you please attach the >output of running: > >jcf-dump -c --classpath xercesImpl.jar >org.apache.xerces.parsers.XML11Configuration > >(redirected, of course, to a file that you can upload)? > >-- > > >http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653 > >------- You are receiving this mail because: ------- >You reported the bug, or are watching the reporter. >You are on the CC list for the bug, or are watching someone who is. _________________________________________________________________ Get 10mb of inbox space with MSN Hotmail Extra Storage http://join.msn.com/?pgmarket=en-sg Created attachment 6795 [details]
gcj-xercesImpl-output.txt
Created attachment 6796 [details]
jcf-dump-xercesImpl-output.txt
(In reply to comment #10) > Based on my last reply ... I couldn't find the XML11Configuration file. > With the new downloaded copy of xerces-j-2.6.2. I managed to perform the jcf- > dump (file: jcf-dump-xercesImpl-output.txt). However, it failed during > compilation (e.g. gcj -c xercesImpl.jar) and the error can be found in > file 'gcj-xercesImpl-output.txt). It's not able to find the indicated class - I guess the other JAR needs to be in the CLASSPATH while you compile this JAR. However, you should not use the "-c" option to compile a JAR. Doesn't (for example): gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar work for you? If you do want to compile xercesImpl.jar into a native library, the proper invocation would be something like: gcj -shared -fPIC --classpath xmlParserAPIs.jar \ -o lib-org-apache-xerces.so Then you can use this library just as you would any normal shared library like so: gcj --main=Main Main.java -l-org-apache-xerces However, the easiest way out for you would be to just use the Xerces2-J packages available with RHUG: http://sources.redhat.com/rhug/ > > The mentioned two output files will be forwarded to you in separated > email...again I failed to attached them from here... > (In reply to comment #14) > (In reply to comment #10) > > Based on my last reply ... I couldn't find the XML11Configuration file. > > With the new downloaded copy of xerces-j-2.6.2. I managed to perform the jcf- > > dump (file: jcf-dump-xercesImpl-output.txt). However, it failed during > > compilation (e.g. gcj -c xercesImpl.jar) and the error can be found in > > file 'gcj-xercesImpl-output.txt). > It's not able to find the indicated class - I guess the other JAR > needs to be in the CLASSPATH while you compile this JAR. > However, you should not use the "-c" option to compile a JAR. > Doesn't (for example): > gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar > work for you? > If you do want to compile xercesImpl.jar into a native library, > the proper invocation would be something like: > gcj -shared -fPIC --classpath xmlParserAPIs.jar \ > -o lib-org-apache-xerces.so > Then you can use this library just as you would any normal > shared library like so: > gcj --main=Main Main.java -l-org-apache-xerces > However, the easiest way out for you would be to > just use the Xerces2-J packages available with > RHUG: > http://sources.redhat.com/rhug/ > > > > The mentioned two output files will be forwarded to you in separated > > email...again I failed to attached them from here... > > > gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar I have tried something like: gcj --classpath .:xmlParserAPIs.jar:xercesImpl.jar --main=Main Main.java But it failed with undefined references (the references are refering to those jars in classpath). Have any idea why --classpath had no effect? With no choice, I then try converting the two jar into native, however, I have not done that correctly ... like you pointed out below ... gcj -shared -fPIC --classpath xmlParserAPIs.jar -o lib-org-apache-xerces.so BTW, I have downloaded the 'rhug' but not able to build them as shared libraries... as I could not run the 'configure'. In any case, I will try to compile again using something like below gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar (In reply to comment #15) > (In reply to comment #14) > > (In reply to comment #10) > > > Based on my last reply ... I couldn't find the XML11Configuration file. > > > With the new downloaded copy of xerces-j-2.6.2. I managed to perform the > jcf- > > > dump (file: jcf-dump-xercesImpl-output.txt). However, it failed during > > > compilation (e.g. gcj -c xercesImpl.jar) and the error can be found in > > > file 'gcj-xercesImpl-output.txt). > > It's not able to find the indicated class - I guess the other JAR > > needs to be in the CLASSPATH while you compile this JAR. > > However, you should not use the "-c" option to compile a JAR. > > Doesn't (for example): > > gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar > > work for you? > > If you do want to compile xercesImpl.jar into a native library, > > the proper invocation would be something like: > > gcj -shared -fPIC --classpath xmlParserAPIs.jar \ > > -o lib-org-apache-xerces.so > > Then you can use this library just as you would any normal > > shared library like so: > > gcj --main=Main Main.java -l-org-apache-xerces > > However, the easiest way out for you would be to > > just use the Xerces2-J packages available with > > RHUG: > > http://sources.redhat.com/rhug/ > > > > > > The mentioned two output files will be forwarded to you in separated > > > email...again I failed to attached them from here... > > > > > gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar > I have tried something like: > gcj --classpath .:xmlParserAPIs.jar:xercesImpl.jar --main=Main Main.java > But it failed with undefined references (the references are refering to those > jars in classpath). Have any idea why --classpath had no effect? > With no choice, I then try converting the two jar into native, however, I have > not done that correctly ... like you pointed out below ... > gcj -shared -fPIC --classpath xmlParserAPIs.jar -o lib-org-apache-xerces.so > BTW, I have downloaded the 'rhug' but not able to build them as shared > libraries... as I could not run the 'configure'. > In any case, I will try to compile again using something like below > gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar Good morning Mathew, (1) I tried compile the application using something like... gcj --main=Main Main.java xmlParserAPIs.jar xercesImpl.jar resolver.jar ... I got a Segmentation Fault ... Detail will be sent separately (2) Next, the xmlParserAPIs.jar, xercesImpl.jar and resolver.jar are converted to shared lib using something like gcj -shared -fPIC --classpath xmlParserAPIs.jar -o libxmlParserAPIs.so and build the application using something like gcj --main=Main Main.java -lxmlParserAPIs -lxercesImpl -lresolver Things turn out fine...:) Subject: RE: incompatible type on stack >From: "rmathew at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> >Reply-To: gcc-bugzilla@gcc.gnu.org >To: mwteng@hotmail.com >Subject: [Bug java/16653] incompatible type on stack >Date: 22 Jul 2004 10:43:23 -0000 > >------- Additional Comments From rmathew at gcc dot gnu dot org 2004-07-22 >10:43 ------- >(In reply to comment #10) > > Based on my last reply ... I couldn't find the XML11Configuration file. > > With the new downloaded copy of xerces-j-2.6.2. I managed to perform the >jcf- > > dump (file: jcf-dump-xercesImpl-output.txt). However, it failed during > > compilation (e.g. gcj -c xercesImpl.jar) and the error can be found in > > file 'gcj-xercesImpl-output.txt). > >It's not able to find the indicated class - I guess the other JAR >needs to be in the CLASSPATH while you compile this JAR. > >However, you should not use the "-c" option to compile a JAR. >Doesn't (for example): > > gcj --main=Main Main.java xercesImpl.jar xmlParserAPIs.jar > >work for you? > >If you do want to compile xercesImpl.jar into a native library, >the proper invocation would be something like: > > gcj -shared -fPIC --classpath xmlParserAPIs.jar \ > -o lib-org-apache-xerces.so > >Then you can use this library just as you would any normal >shared library like so: > > gcj --main=Main Main.java -l-org-apache-xerces > >However, the easiest way out for you would be to >just use the Xerces2-J packages available with >RHUG: > > http://sources.redhat.com/rhug/ > > > > > > The mentioned two output files will be forwarded to you in separated > > email...again I failed to attached them from here... > > > > > >-- > > >http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16653 > >------- You are receiving this mail because: ------- >You reported the bug, or are watching the reporter. >You are on the CC list for the bug, or are watching someone who is. _________________________________________________________________ Find love on MSN Personals http://personals.msn.com.sg/ Created attachment 6807 [details]
SegFault-compile-with-jar-output.txt
(In reply to comment #18) > Created an attachment (id=6807) Any idea why ... when compile the application using something like... gcj --main=Main Main.java xmlParserAPIs.jar xercesImpl.jar resolver.jar ... I got a Segmentation Fault ... Detail refers to attachment SegFault- compile-with-jar-output.txt The included xmlParserAPIs.jar and xercesImpl.jar compiled fine for me on x86 FC4 using svn gcc 4.0.x. So, I'm closing this. |