hg: valhalla/valhalla: [lworld] Handle casted value type receiver in GraphKit::gen_instanceof

Tobias Hartmann tobias.hartmann at oracle.com
Mon Jun 11 15:47:10 UTC 2018


Summary:
Since [1], "maybe_cast_profiled_receiver" can return a ValueTypeNode. We need to handle this
properly in GraphKit::gen_instanceof to avoid failures like this:

#  SIGSEGV (0xb) at pc=0x00007f94eef9a7de, pid=4974, tid=4988
#
# JRE version: Java(TM) SE Runtime Environment (11.0) (fastdebug build 11-internal+0-adhoc.tobias.open)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 11-internal+0-adhoc.tobias.open, mixed mode,
compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x6907de]  AddPNode::Value(PhaseGVN*) const+0x12e

Current CompileTask:
C2:  67098  556    b        compiler.valhalla.valuetypes.TestLWorld::test62 (5 bytes)

Stack: [0x00007f94d06b3000,0x00007f94d07b4000],  sp=0x00007f94d07b0950,  free space=1014k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native
code)
V  [libjvm.so+0x6907de]  AddPNode::Value(PhaseGVN*) const+0x12e
V  [libjvm.so+0x16f48cc]  PhaseGVN::transform_no_reclaim(Node*)+0x13c
V  [libjvm.so+0xeee130]  GraphKit::load_object_klass(Node*)+0xe0
V  [libjvm.so+0xef49ca]  GraphKit::gen_instanceof(Node*, Node*, bool)+0x6fa
V  [libjvm.so+0x16c549b]  Parse::do_instanceof()+0x60b
V  [libjvm.so+0x16b8725]  Parse::do_one_bytecode()+0x1075
V  [libjvm.so+0x16a7dba]  Parse::do_one_block()+0x39a
V  [libjvm.so+0x16a89d1]  Parse::do_all_blocks()+0x1d1
V  [libjvm.so+0x16ac47a]  Parse::Parse(JVMState*, ciMethod*, float)+0xd3a
V  [libjvm.so+0x90161c]  ParseGenerator::generate(JVMState*)+0x1fc
V  [libjvm.so+0xb37087]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool,
DirectiveSet*)+0x1027
V  [libjvm.so+0x8ff702]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x302
V  [libjvm.so+0xb44d80]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x3c0
V  [libjvm.so+0xb45a69]  CompileBroker::compiler_thread_loop()+0x269
V  [libjvm.so+0x195c8c7]  JavaThread::thread_main_inner()+0x287
V  [libjvm.so+0x195cb21]  JavaThread::run()+0x191
V  [libjvm.so+0x16408da]  thread_native_entry(Thread*)+0xfa

Thanks,
Tobias

[1] http://hg.openjdk.java.net/valhalla/valhalla/rev/17e0d6032435

On 11.06.2018 17:45, tobias.hartmann at oracle.com wrote:
> Changeset: 091757214784
> Author:    thartmann
> Date:      2018-06-11 17:45 +0200
> URL:       http://hg.openjdk.java.net/valhalla/valhalla/rev/091757214784
> 
> [lworld] Handle casted value type receiver in GraphKit::gen_instanceof
> 
> ! src/hotspot/share/opto/graphKit.cpp
> 



More information about the valhalla-dev mailing list