JDK-8137021 : [JVMCI] CompilerToVM methods "lookupNameRefInPool" and "lookupSignatureRefInPool" cause JVM crash
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-09-23
  • Updated: 2017-08-04
  • Resolved: 2015-09-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Fixed
Related Reports
Relates :  
Description
Got crash when tried to execute these method "lookupNameRefInPool" on the constant pool containing:
   #54 = Utf8               <init>
   #55 = Utf8               ()V
   #68 = NameAndType        #54:#55       // "<init>":()V 

Used "lookupNameRefInPool(constantPool, 68)" and expect to get String "<init>", but get crash

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fbe944a63b4, pid=1415, tid=0x00000000000005a1
#
# JRE version: Java(TM) SE Runtime Environment (9.0) (build 1.9.0-internal-kshefov_2015_09_18_14_21-b00)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.9.0-internal-kshefov_2015_09_18_14_21-b00, mixed mode, tiered, jvmci, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x6c63b4] java_lang_String::create_from_symbol(Symbol*, Thread*)+0x14
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to /home/kshefov/JTwork/scratch/core.1415)
#
# An error report file with more information is saved as:
# /home/kshefov/JTwork/scratch/hs_err_pid1415.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# 

The same issue with "lookupSignatureRefInPool" method.
Comments
was fixed is project repo, verified as part of integration testing.
04-08-2017

http://hg.openjdk.java.net/graal/graal-jvmci-9/hotspot/rev/5e1639f9a14e
23-09-2015

Fixed in jvmci-8: http://hg.openjdk.java.net/graal/graal-jvmci-8/rev/f0ec628cb987
23-09-2015

Can you please provide a command line on how to execute with JTREG.
23-09-2015

Test cases attached. Just apply the attached patches to a clone of http://hg.openjdk.java.net/graal/graal-jvmci-9/hotspot and run tests with JTREG: test/compiler/jvmci/CompilerToVM/LookupNameRefInPoolTest.java test/compiler/jvmci/CompilerToVM/LookupSignatureRefInPoolTest.java
23-09-2015