Menu

#846 Jikes 1.18 and 1.19 segfault under Linux

open
open
nobody
None
5
2004-02-25
2004-02-25
Anonymous
No

I've regularly been getting segfaults from Jikes 1.18 and 1.19 under RedHat Linux 9.0 (both installed from rpms). I have never seen a segfault from Jikes 1.13 even when compiling the same code base.

Unfortunately I can't send you the source code that triggered this exception because most of it is proprietary. I tried boiling the megabytes of source code down to a short test case but was unsuccessful because seemingly tiny changes would change the outcome between segfault <-> normal failed compile.

I would be happy to run tests for you.

jikes 1.19 was invoked as follows:

$ /usr/bin/jikes \ -source 1.3 \ +E \ +P \ +Pmodifier-order \ +Predundant-modifiers \ +Pno-naming-convention \ -classpath .:/opt/IBMJava2-13/jre/lib/rt.jar:/opt/xerces/xerces.jar:/opt/JavaLib-1.2/mlibwrapper_jai.jar:/opt/Ja
vaLib-1.2/jai_core.jar:/opt/JavaLib-1.2/jai_codec.jar:/opt/JavaLib-1.2/core.jar:/opt/JavaLib-1.2/j3dutils.jar:/opt/JavaL
ib-1.2/j3dcore.jar:/opt/JavaLib-1.2/vecmath.jar:/opt/JavaLib-1.2/visad.jar:/opt/JavaLib-1.2/junit.jar:/usr/local/jython/
jython.jar \ <then lots of *.java files here>

The backtrace from the core dump is:

(gdb) bt
#0 0x00000000 in ?? ()
#1 0x080696bc in SymbolSet::AddElement(Symbol*) ()
#2 0x080c4bac in Semantic::ProcessTypeHeader(AstClassDeclaration*) ()
#3 0x080c587d in Semantic::ProcessTypeHeaders(AstClassDeclaration*) ()
#4 0x0814fb4c in TypeSymbol::ProcessTypeHeaders() ()
#5 0x080bef34 in Control::ProcessMembers() ()
#6 0x080be956 in Control::ProcessFile(FileSymbol*) ()
#7 0x080bac60 in Control::Control(char**, Option&) ()
#8 0x0812ea28 in JikesAPI::compile(char**) ()
#9 0x0812e0bb in main ()
#10 0x401155cd in __libc_start_main () from /lib/libc.so.6

Discussion

  • Eric Blake

    Eric Blake - 2004-03-10

    Well, without a reproducible test case, you can't honestly expect us to fix it. Come up with a smaller, non-proprietary example if you want help.

     
  • Nobody/Anonymous

    Well, after half a day of work I boiled the example down to 202 lines of erroneous Java in 9 files...plus the 22Mb of jar files that have to be in the classpath to get the segfault. But now I see that there is no way for me to append a file to this comment :-(

    I wonder whether you could get the exact same segfault even with my Java source because whether or not the segfault occurs depends very nonlinearly on *everything*:

    - Adding or deleting whitespace in comments

    - Deleting Java source files from the jikes invocation--even for source files that don't exist in the directory

    - Adding or deleting any of the jars in the classpath

    - Removing the 'CVS' subdirectories from the build tree even though they don't contain any Java files whatsoever

    The jar files in the classpath (see above) include IBM's runtime, Xerces, Java Advanced Imaging, Java3D, VisAD (a graphics library), and the Jython interpreter.

    I would be happy to send you a tar file of my source and any jar files whose licenses don't prohibit it, but obviously I can't put 22Mb of data into this little text input box. Alternatively I would be happy to run tests for you on my machine if you are specific about what I might be able to do to help.

    Regarding the Jython interpreter, I found a reference that might conceivably be relevant:

    http://www.kaffe.org/pipermail/kaffe/2004-January.txt

    A poster claims that there is a version of the jython jar file that has been compiled with a (buggy) compiler that includes an exception table where e->start_pc is not less than e->end_pc. This apparently causes trouble with the kaffe runtime but I have no idea whether it could affect jikes.

     
  • Elliott Hughes

    Elliott Hughes - 2004-05-20

    Can you still reproduce this with jikes 1.21?

     
  • Nobody/Anonymous

    We are now using Jikes 1.22 and I haven't seen this problem yet.

     

Log in to post a comment.