[8u] RFR: fix of vtable self-patching routine
Fedor Burdun
fedor.burdun at azulsystems.com
Thu Apr 7 17:14:36 UTC 2016
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CDS.patch
Type: text/x-diff
Size: 2513 bytes
Desc: CDS.patch
URL: <http://mail.openjdk.java.net/pipermail/aarch32-port-dev/attachments/20160407/3b4140af/CDS.patch>
More information about the aarch32-port-dev
mailing list