[8u] RFR: fix of vtable self-patching routine
Sergey Nazarkin
snazarkin at azul.com
Mon May 16 15:31:09 UTC 2016
Seems we forgot about this issue. I can’t find it in the logs at least.
Sergey Nazarkin
> On 07 Apr 2016, at 20:14, Fedor Burdun <fedor.burdun at azulsystems.com> wrote:
>
> Hi all,
>
> I would like to ask you several reviews of proposed fix of issue below.
>
> The problem is crash caused by using CDS.
> It occurs because c++ vtables self-patching routine (written in metaspaceShared_aarch32.cpp) corrupts r9 register, that can be used by c++ compiler to store locals.
> Usually it happens in Method::restore_vtable virtual call, that causes undefined behaviour (mostly crahes) in InstanceKlass::restore_unshareable_info function.
>
> Reproduction steps:
> # dump shared space
> $ java -Xint -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=./sample.jsa -Xshare:dump
>
> # restore from CDS (crash happens here)
> $ java -Xint -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=./sample.jsa -Xshare:on -version
>
> Fix is in attachement.
>
> Thanks,
> Fedor
> <CDS.patch>
More information about the aarch32-port-dev
mailing list