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: Patch: FYI: JNI and synchronized native


>>>>> "Jeff" == Jeff Sturm <jsturm@one-point.com> writes:

>> +  if (sync != NULL)
>> +    _Jv_MonitorExit (sync);

Jeff> I don't see a cleanup here.  What happens to the monitor if an
Jeff> exception is thrown from the called function?

The monitor remains held.  Obviously this would be bad.

Do we need to support the ability to throw a C++ exception from a JNI
call?  I would imagine this would break just about any JVM.  In this
context, Java exceptions can only be thrown via the appropriate JNI
call; we handle that case correctly.

Tom


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