[foreign-memaccess] RFR: 8227424: C2 assertion failures with debug build

Nick Gasson nick.gasson at arm.com
Wed Jul 10 07:42:39 UTC 2019


Hi Maurizio,

> 
> In the case of the ASM generated code, I believe we have it the wrong way
> around, as the expected type is VarHandleMemoryAddressAsInts1, but the found
> type is just VarHandleMemoryAddressBase - which I don't think is enough to
> satisfy the verifier rules. I think it's more likely that this rule has never
> been enforced too strictly - but it's nevertheless there.
> 
> I agree that it would be nice to know some background here - if the code indeed
> violates the verifier spec, why is this just a debug-only assertion?
> 

Is it just that the verifier isn't running when we define the class 
through Unsafe.defineAnonymousClass? I tried something similar in a 
regular .class file and it threw "java.lang.VerifyError: Bad type on 
operand stack" when loading.

Thanks,
Nick



More information about the panama-dev mailing list