match_info

Jeff Sturm jeff.sturm@commerceone.com
Tue Feb 6 09:07:00 GMT 2001


Can any EH gurus explain what the following code in exception.c does:

  /* we don't worry about version info yet, there is only one version! */

  if (match_info != NULL)
    {
      // The match_info is either a (java::lang::Class*) or
      // match_info is one more than a (Utf8Const*).
      if (sizeof(void*) != sizeof(size_t))
        abort();
      size_t mi = (size_t) match_info;
      if ((mi & 1) != 0)
        match_info = _Jv_FindClass ((Utf8Const*) (mi - 1), NULL);
      if (! _Jv_IsInstanceOf ((jobject) info->value, (jclass) match_info))
        return NULL;
    }

It doesn't do anything but argument checking as far as I can tell.  Anyway, I'm
trying to figure out why my _Jv_type_matcher is getting called with match_info =
0xffffffff, causing this code to segfault:

#0  _Z20_Jv_FindClassInCacheP13_Jv_Utf8ConstPN4java4lang11ClassLoaderE (
    name=0xfffffffe, loader=0x0)
    at ../../../libjava/java/lang/natClassLoader.cc:337
#1  0x408fef51 in _Z13_Jv_FindClassP13_Jv_Utf8ConstPN4java4lang11ClassLoaderE (
    name=0xfffffffe, loader=0x0)
    at ../../../libjava/java/lang/natClassLoader.cc:460
#2  0x408ed54a in _Jv_type_matcher (info=0x80eff48, match_info=0xffffffff, 
    exception_table=0x405f6dcc) at ../../../libjava/exception.cc:62
#3  0x404ecf41 in find_exception_handler (pc=0x40399485, table=0x405f6dcc, 
    eh_info=0x80eff48, rethrow=0, cleanup=0xbe9ff09c)
   from /home/jsturm/lib/liboracle.so
#4  0x404ed49a in throw_helper (eh=0x80eff70, pc=0x40399486, 
    my_udata=0xbe9ff310, offset_p=0xbe9ff30c)
   from /home/jsturm/lib/liboracle.so
#5  0x404ed58a in __throw () from /home/jsturm/lib/liboracle.so
#6  0x408ed69a in _Jv_Throw (value=0x8337980)
    at ../../../libjava/exception.cc:160

--
Jeff Sturm
jeff.sturm@commerceone.com


More information about the Java mailing list