-
Bug
-
Resolution: Fixed
-
P4
-
port-stage-aarch32-8, port-stage-aarch32-9
-
aarch32
-
linux
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
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