This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Interpreter aborts when it should have handled an exception


I've had this sort of problem with several recent gcc builds.  The
interpreter aborts when the code should have caught an exception.
Are others seeing the same problem?
Anybody know what's going on?

gij (GNU libgcj) version 4.1.0 20051116 (experimental)
(revision 107090 from SVN, checked out 2005-11-16)
Linux version 2.6.8.1-10mdk

Here's the trivial source I'm trying to run with the interpreter.  It works
OK when compiled to a dynamic executable, but not interpreted (static build
isn't working either, but it may be a separate issue).
  public class Hello
  {
    public static void main (String[] args)
    {
      System.out.println("hello");
    }
  }

Here's the source for java.util.logging.LogManager.getLevelProperty, which
appears in the trace below.  Note that it catches Exception -- that's what
isn't working with the interpreter.
  static Level getLevelProperty(String propertyName, Level defaultValue)
  {
    try
      {
        return Level.parse(getLogManager().getProperty(propertyName));
      }
    catch (Exception ex)
      {
        return defaultValue;
      }
  }

Here's a backtrace from a core dump captured when gij crashes:
(gdb) bt
#0  0x412b0ca1 in kill () from /lib/i686/libc.so.6
#1  0x412223a1 in pthread_kill () from /lib/i686/libpthread.so.0
#2  0x4122271b in raise () from /lib/i686/libpthread.so.0
#3  0x412b0908 in raise () from /lib/i686/libc.so.6
#4  0x412b1f70 in abort () from /lib/i686/libc.so.6
#5  0x4073fa6c in _Jv_Throw (value=0xa9df8) at
../../../gcc/libjava/exception.cc:111
#6  0x40734753 in _Jv_ThrowNullPointerException () at
../../../gcc/libjava/prims.cc:359
#7  0x00000000 in ?? ()
#8  0x40a05c46 in java.util.logging.Level.parse(java.lang.String) (name=0x0)
at Level.java:359

<<<<<<<<<<< NEXT ENTRY SHOULD HAVE CAUGHT THE EXCEPTION >>>>>>>>>>>>>>
#9  0x40a05cdb in
java.util.logging.LogManager.getLevelProperty(java.lang.String,
java.util.logging.Level) (propertyName=0xa9e10, defaultValue=Variable
"defaultValue" is not available. )
    at LogManager.java:682

#10 0x40a05d87 in
java.util.logging.StreamHandler.StreamHandler(java.io.OutputStream,
java.lang.String, java.util.logging.Level, java.util.logging.Formatter,
java.lang.Class) (this=0x4a7d0,
    out=0x4df18, propertyPrefix=0xa6540, defaultLevel=0x9e810,
formatter=0x0,
    defaultFormatterClass=0x41037b60) at StreamHandler.java:128
#11 0x40a061d3 in java.util.logging.ConsoleHandler.ConsoleHandler()
(this=0x4a7d0)
    at ConsoleHandler.java:82
#12 0x40767421 in java::lang::Class::newInstance (this=0x41036f20)
    at ../../../gcc/libjava/java/lang/natClass.cc:656
#13 0x40a06594 in
java.util.logging.LogManager.readConfiguration(java.io.InputStream) (
    this=0x4d078, inputStream=0x4ee20) at LogManager.java:534
#14 0x40a0542c in java.util.logging.LogManager.readConfiguration()
(this=0x4d078)
    at LogManager.java:491
#15 0x40a05aeb in java.util.logging.LogManager.<clinit>() () at
LogManager.java:186
#16 0x407671f3 in java::lang::Class::initializeClass (this=0x410375c0)
    at ../../../gcc/libjava/java/lang/natClass.cc:739
#17 0x407677a7 in _Jv_InitClass (klass=0x410375c0) at Class.h:584
#18 0x40a011c2 in java.util.logging.LogManager.getLogManager() () at
LogManager.java:169
#19 0x40a04876 in java.util.logging.Logger.getLogger(java.lang.String,
java.lang.String) (
    name=0x6c140, resourceBundleName=0x0) at Logger.java:258
#20 0x40a049d2 in java.util.logging.Logger.getLogger(java.lang.String)
(name=0x6c140)
    at Logger.java:206
#21 0x40a049f6 in java.util.logging.Logger.<clinit>() () at Logger.java:76
#22 0x407671f3 in java::lang::Class::initializeClass (this=0x41037880)
    at ../../../gcc/libjava/java/lang/natClass.cc:739
#23 0x407677a7 in _Jv_InitClass (klass=0x41037880) at Class.h:584
#24 0x40a049be in java.util.logging.Logger.getLogger(java.lang.String)
(name=0x8ca80)
    at Logger.java:205
#25 0x4077994d in gnu.classpath.debug.SystemLogger.<clinit>() () at
SystemLogger.java:47


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]