[8u] RFR: not use rthread as temporary in MethodHandle
Anton Kozlov
akozlov at azul.com
Fri Apr 1 13:01:19 UTC 2016
Hi, All!
MethodHandle uses r8 (rthread) as temporary register and not restores
it after. This is the reason jtreg
java/lang/invoke/PrivateInvokeTest.java failed in release mode with
such message:
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x75568878, pid=471, tid=1675060320
#
# JRE version: OpenJDK Runtime Environment (8.0_60-b99) (build 1.8.0_60
-internal-b99)
# Java VM: OpenJDK Client VM (25.60-b23 mixed mode linux-aarch32 )
# Problematic frame:
# V [libjvm.so+0x129878] GrowableArray<Metadata*>::append(Metadata*
const&)+0x8
#
I suggest just to not use rthread as temporary. Registers r5-r7 seems
to be fine as temporary registers, as they holds cached values in
interpreter mode and will be restored on enter to interpreter; and they
are callee-saved and can't hold arguments in compiled/native calling
conventions (however, r4 used in critical native code, so r5 is first).
Thanks,
Anton
More information about the aarch32-port-dev
mailing list