[concurrency-interest] @Contended (JEP-142)

Remi Forax forax at univ-mlv.fr
Tue Nov 27 17:30:46 EST 2012


On 11/27/2012 09:49 PM, Gregg Wonderly wrote:
> On 11/27/2012 2:16 PM, Doug Lea wrote:
>> On 11/27/12 13:39, Tim Halloran wrote:
>>> (point) The implementation in the JVM could consider a "sloppy"
>>> matching scheme which ignores the package -- so that, for example,
>>> com.my.code.Contended works just as well as sun.misc.Contended. This
>>> is easy to do, and I'm guessing there is an -XX: flag in the work to
>>> turn the whole scheme off in the unlikely case @Contended means the
>>> field was discussed in a code inspection (or some other nonsense).
>>>
>>
>> Thanks; weird but fun. It might come to that. Or to someone creating
>> a little bytecode tool that translates anything.Contended
>> to sun.misc.Contended.
>
> For the sake of the Java security system, I'd guess that any ability 
> to alias packages would not be a good thing to have exploitable in the 
> VM at runtime.
>
> Gregg Wonderly
>

There is already a tool for that, it just rewrites the jars thus updates 
all dependencies
   https://code.google.com/p/jarjar/
it's based on ASM for the low level bytecode rewriting.

Rémi



More information about the Concurrency-interest mailing list