[kaffe] CVS kaffe (hkraemer): corrected checks whether accesses from an inner class are correct
Kaffe CVS
cvs-commits at kaffe.org
Sun Jul 11 11:16:29 PDT 2004
PatchSet 4930
Date: 2004/07/11 18:09:06
Author: hkraemer
Branch: HEAD
Tag: (none)
Log:
corrected checks whether accesses from an inner class are correct
Members:
ChangeLog:1.2495->1.2496
kaffe/kaffevm/access.c:1.6->1.7
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2495 kaffe/ChangeLog:1.2496
--- kaffe/ChangeLog:1.2495 Sun Jul 11 17:44:52 2004
+++ kaffe/ChangeLog Sun Jul 11 18:09:06 2004
@@ -1,3 +1,10 @@
+2004-07-11 Helmer Kraemer <hkraemer at freenet.de>
+
+ * kaffe/kaffevm/access.c (checkAccess): fix check when an inner class
+ accesses an inner class of its superclass
+
+ Reported by: Alan Tam <Tam at SiuLung.com>
+
2004-07-11 Guilhem Lavaux <guilhem at kaffe.org>
* kaffe/kaffevm/ksem.c (ksemPut): Removed the assertion as
Index: kaffe/kaffe/kaffevm/access.c
diff -u kaffe/kaffe/kaffevm/access.c:1.6 kaffe/kaffe/kaffevm/access.c:1.7
--- kaffe/kaffe/kaffevm/access.c:1.6 Mon Nov 17 15:32:40 2003
+++ kaffe/kaffe/kaffevm/access.c Sun Jul 11 18:09:08 2004
@@ -158,7 +158,7 @@
}
else if( target->accflags & ACC_PROTECTED )
{
- /* check whether target is non private innerclass of superclass */
+ /* check whether target is non private innerclass of superclass */
innerClass *ict;
innerClass *icc;
Hjava_lang_Class *outert;
@@ -167,6 +167,7 @@
ict = icc = NULL;
outert = outerc = NULL;
+ /* get class containing the accessed class (the target) */
if( target->this_inner_index >= 0 )
{
ict = &target->inner_classes[target->this_inner_index];
@@ -179,6 +180,7 @@
}
}
}
+ /* get class containing the accessing class (the context) */
if( context->this_inner_index >= 0 )
{
icc = &context->inner_classes[context->this_inner_index];
@@ -204,7 +206,8 @@
}
}
- else if ( outert != NULL )
+
+ if ( !class_acc && (outert != NULL) )
{
class_acc = instanceof(outert, context);
}
More information about the kaffe
mailing list