United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7024866 # assert(limit == NULL || limit <= nm->code_end()) failed: in bounds
JDK-7024866 : # assert(limit == NULL || limit <= nm->code_end()) failed: in bounds

Details
Type:
Bug
Submit Date:
2011-03-05
Status:
Closed
Updated Date:
2011-04-25
Project Name:
JDK
Resolved Date:
2011-04-25
Component:
hotspot
OS:
solaris_10
Sub-Component:
compiler
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs21
Fixed Versions:
hs21 (b05)

Related Reports
Backport:

Sub Tasks

Description
smite ~ % /tmp/i586/jdk1.7.0/bin/java -d64 -XX:+PrintNMethods -Xcomp -XX:-DisplayVMOutput foo                                                         
VM option '+PrintNMethods'
VM option '-DisplayVMOutput'
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/relocInfo.cpp:169
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/B/074805.kvn/source/src/share/vm/code/relocInfo.cpp:169), pid=11522, tid=15
#  assert(limit == NULL || limit <= nm->code_end()) failed: in bounds#
# JRE version: 7.0-b120
# Java VM: Java HotSpot(TM) 64-Bit Server VM (21.0-b03-internal-201103040748.kvn.main_to_comp-fastdebug compiled mode solaris-amd64 compressed oops)
# Core dump written. Default location: /never/core or core.11522
#
# An error report file with more information is saved as:
# /never/hs_err_pid11522.log## If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp#Current thread is 15

                                    

Comments
EVALUATION

This appears to be a long standing issue that for some reason we never tripped across.  If an address appears in the disassembly we check to see if it has relocInfo so we can print out the actual value.  In this case a jmpq is right at the end of the code and an it's encoded in a short fashion.  The code that attempts to look up the oop does this:

oop nmethod::embeddedOop_at(u_char* p) {
  RelocIterator iter(this, p, p + oopSize);

and in this case p + oopSize is greater than code_end.  The fix is use p + 1 as the end since we're really looking for a reloc at p.  + 1 is the normal idiom for this in other places.  Tested with -Xcomp -XX:+PrintNMethods which showed the failure previously.
                                     
2011-03-05
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/4cd9add59b1e
                                     
2011-03-05
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/4cd9add59b1e
                                     
2011-03-21



Hardware and Software, Engineered to Work Together