classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unstructured locking bug


From: Chris Pickett
Subject: Re: Unstructured locking bug
Date: Mon, 14 Mar 2005 16:38:15 -0500
User-agent: Debian Thunderbird 1.0 (X11/20050116)

Tom Tromey wrote:
"Bryce" == Bryce McKinlay <address@hidden> writes:


Bryce> Certainly, bytecode isn't allowed to do this kind of thing, but I'm
Bryce> not sure if the structured locking rules in the VM spec are meant to
Bryce> apply to native code. For example, wait() would be impossible to
Bryce> implement if this were the case, wouldn't it?

I agree with your main point, that it isn't clear that this
restriction is meant to apply to native code.  I suppose I would
expect to see a note in the JNI spec about this -- except that the JNI
specification is in general not that precise.  (As to wait(), I think
one could plausibly argue that it is a special case, part of the VM.)

The problem exists when native code does things that are visible to non-native code, like locking objects. If it doesn't touch the Java heap then I would say that yes, you can do whatever you want.

Cheers,
Chris




reply via email to

[Prev in Thread] Current Thread [Next in Thread]