review for 7103380: assertion failure with -XX:+PrintNativeNMethods

Tom Rodriguez tom.rodriguez at
Thu Oct 20 17:55:30 PDT 2011
11 lines changed: 10 ins; 0 del; 1 mod; 1028 unchg

7103380: assertion failure with -XX:+PrintNativeNMethods

Running with -XX:+PrintNativeNMethods I hit the assert:

#  assert(limit == NULL || limit <= nm->code_end()) failed: in bounds

The problem is that old instructions in the code buffer after the real
code, so the disassembler attempts to disassemble off the end of the
buffer.  This is because alignment of the end CodeSections is
performed by looking at the predecessor of the current section.
Fixing the alignment to always align the beginning and end seems to
fan out causing other problems.  Instead I added some logic similar to
the existing fill logic to fill any remaining space in the
destination.  The reason native wrappers fall afoul of this is that
the don't have a stub section.  Tested with -XX:+PrintNativeNMethods.

More information about the hotspot-compiler-dev mailing list