JDK-6511206 : Error: assert(0 <= i && i < _len,"illegal index")
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 5.0,7
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-01-09
  • Updated: 2012-10-01
  • Resolved: 2007-01-31
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 6 JDK 7 Other
6u4Fixed 7Fixed hs10Fixed
nsk tests:


fail with this assert.

SUGGESTED FIX thread.cpp ! jvmtiDeferredLocalVariableSet* dlv = deferred->at(1); ! deferred->remove_at(1); becomes ! jvmtiDeferredLocalVariableSet* dlv = deferred->at(0); ! deferred->remove_at(0);

EVALUATION This code in the JavaThread destructor is asserting and clearly wrong. assert(deferred->length() != 0, "empty array!"); do { jvmtiDeferredLocalVariableSet* dlv = deferred->at(1); deferred->remove_at(1); // individual jvmtiDeferredLocalVariableSet are CHeapObj's delete dlv; } while (deferred->length() != 0); delete deferred; the "1" parameter for at() and remove_at() should be zero.