8199342 The constant pool forgets it has a Dynamic entry if there are overpass methods

Karen Kinnear karen.kinnear at oracle.com
Fri Mar 9 20:59:15 UTC 2018


Looks good. Thanks for catching this.

And redefineclasses goes through the ClassFileParser so should set the flag there.

thanks,
Karen


p.s. thank you for the test. A note - I believe this code path is called for any class file
that requires an overpass due to default method processing. We create these to throw
a number of exceptions, such as IncompatibleClassChangeError (e.g. diamond shape
for default methods) or some of the AbstractMethodError cases.

> On Mar 9, 2018, at 1:59 PM, Lois Foltan <lois.foltan at oracle.com> wrote:
> 
> Looks good Paul!
> Lois
> 
> On 3/8/2018 8:45 PM, Paul Sandoz wrote:
>> Hi,
>> 
>> Please review the following patch:
>> 
>> http://cr.openjdk.java.net/~psandoz/jdk/JDK-8199342-constant-dynamic-and-overpass-methods/webrev/ <http://cr.openjdk.java.net/%7Epsandoz/jdk/JDK-8199342-constant-dynamic-and-overpass-methods/webrev/>
>> 
>> This fixes a crash due to an assert with debug builds.
>> 
>> On class initialization we set a flag if the constant pool contains a Dynamic entry. If the class file is an interface and there are overpass methods then parts the constant pool gets re-written by copying the old pool to a new pool, but that process does not copy over the flag.
>> 
>> Thanks,
>> Paul.
> 



More information about the hotspot-dev mailing list