bug 6693236 fix

Kelly O'Hair kelly.ohair at oracle.com
Thu Jul 8 09:11:13 PDT 2010


On Jul 8, 2010, at 6:13 AM, Rémi Forax wrote:

> Le 08/07/2010 14:07, Keith McGuigan a écrit :
>> David Holmes wrote:
>>> Rémi Forax said the following on 07/08/10 19:55:
>>>> Hi David,
>>>> I've no problem with the fact that the default configuration of  
>>>> jdk7
>>>> mandate to use of the split verifier.
>>>> But the patch for bug 6693236 also make FailOverOldVerifier  
>>>> command line flag useless.
>>>>
>>>> I think it's an error. FailOverOldVerifier should "fail over the  
>>>> old verifier" and not be silently ignored.
>>>
>>> For Java 7 you're not permitted to failover to the old verifier so  
>>> the choices are to:
>>>
>>> a) silently ignore it
>>> b) ignore it but issue a warning
>>> c) refuse to start the VM
>>>
>>> I presume you would prefer (b) or (c)?
>>
>> At startup time, the JVM doesn't know what kind of classfiles it's  
>> going to load.  It doesn't get fed a steady diet of same-versioned  
>> classfiles.  Failover is still an option for classfiles with  
>> classfile version 50.
>>
>> So it's really not being ignored, it still enables failover for old  
>> classfile versions.  Just not the new ones.
>>
>> -- 
>> - Keith
>
> Hi Keith,
> The problem is that bytecode transformations at runtime is a common  
> trick,
> especially since the VM has an agent API (java.lanf.instrumentation).
> Such agents modify the bytecode at runtime by rewritting it.
> During the rewrite, the stackmap information are often discarded,
> because the agent was written before the release of 1.6 or
> because generating stackmap frames takes more time than using
> the old verifier.
>
> With this fix, these agent libraries will stop working with 1.7  
> classfiles
> and there is no workaround until the agent code is updated.

Agent libraries that re-write bytecodes of classfiles and do not also  
transform the
StackMapTable attributes seem like very broken libraries to me.

The java_crw_demo bytecode instrumentation code in the jdk used by  
hprof performs
the necessary transformation of the StackMapTable offsets. See:
   http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/820b4e843d51/src/share/demo/jvmti/java_crw_demo/java_crw_demo.c
starting around line 1710. It wasn't that difficult.

Bytecode transformation people should have known about this for a very  
long time.

-kto

>
> Rémi



More information about the hotspot-runtime-dev mailing list