This is the mail archive of the java-patches@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]

Re: [BC] Patch: FYI: access check without initialization


Tom Tromey wrote:

I'm checking this in on the BC branch.

My previous patch didn't take into account that _Jv_CheckAccess will
initialize classes.  This caused some problems when trying to run
Eclipse.  Fixed as appended.

* prims.cc (_Jv_CheckAccessNoInit): New method.


This is actually a bug in _Jv_CheckAccess. It shouldn't need to initialize classes, rather Class objects should always have their ancestors/interface tables linked by the time we call it. In this case, that should always be true, because _Jv_PrepareConstantTimeTables will be called before vtable layout.

It *should* be safe to instead change _Jv_CheckAccess to use _Jv_IsAssignableFrom (which doesnt initialize). If there are other cases where _Jv_CheckAccess could be called with a non-prepared class argument, they should be fixed.

Regards

Bryce


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