[multiple changes]
2001-05-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * include/jvm.h: Move "#pragma GCC java_exceptions" to ... * gcj/javaprims.h: ... here. * gnu/gcj/io/shs.cc: Add "#pragma GCC java_exceptions". 2001-05-17 Martin Kahlert <martin.kahlert@infineon.com> * java/lang/natClass.cc (_Jv_FindIIndex): Fix an off by one error with length of ioffset table. (_Jv_IsAssignableFrom): Likewise. From-SVN: r42248
This commit is contained in:
parent
6fd72f814a
commit
ca1906ff9a
5 changed files with 22 additions and 7 deletions
|
@ -936,7 +936,7 @@ _Jv_IsAssignableFrom (jclass target, jclass source)
|
|||
if (__builtin_expect ((if_idt == NULL), false))
|
||||
return false; // No class implementing TARGET has been loaded.
|
||||
jshort cl_iindex = cl_idt->cls.iindex;
|
||||
if (cl_iindex <= if_idt->iface.ioffsets[0])
|
||||
if (cl_iindex < if_idt->iface.ioffsets[0])
|
||||
{
|
||||
jshort offset = if_idt->iface.ioffsets[cl_iindex];
|
||||
if (offset < cl_idt->cls.itable_length
|
||||
|
@ -1181,8 +1181,7 @@ _Jv_GenerateITable (jclass klass, _Jv_ifaces *ifaces, jshort *itable_offsets)
|
|||
{
|
||||
jclass iface = ifaces->list[i];
|
||||
itable_offsets[i] = itable_pos;
|
||||
itable_pos = _Jv_AppendPartialITable (klass, iface, itable,
|
||||
itable_pos);
|
||||
itable_pos = _Jv_AppendPartialITable (klass, iface, itable, itable_pos);
|
||||
|
||||
/* Create interface dispatch table for iface */
|
||||
if (iface->idt == NULL)
|
||||
|
@ -1325,7 +1324,7 @@ _Jv_FindIIndex (jclass *ifaces, jshort *offsets, jshort num)
|
|||
{
|
||||
if (j >= num)
|
||||
goto found;
|
||||
if (i > ifaces[j]->idt->iface.ioffsets[0])
|
||||
if (i >= ifaces[j]->idt->iface.ioffsets[0])
|
||||
continue;
|
||||
int ioffset = ifaces[j]->idt->iface.ioffsets[i];
|
||||
/* We can potentially share this position with another class. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue