United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6511206 Error: assert(0 <= i && i < _len,"illegal index")
JDK-6511206 : Error: assert(0 <= i && i < _len,"illegal index")

Details
Type:
Bug
Submit Date:
2007-01-09
Status:
Resolved
Updated Date:
2012-10-01
Project Name:
JDK
Resolved Date:
2007-01-31
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
5.0,7
Fixed Versions:
hs10 (b07)

Related Reports
Backport:
Backport:

Sub Tasks

Description
nsk tests:

nsk/jvmti/SetLocalVariable/setlocal001 
nsk/jvmti/scenarios/capability/CM01/cm01t011

fail with this assert.

                                    

Comments
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.
                                     
2007-01-09
SUGGESTED FIX

thread.cpp


!       jvmtiDeferredLocalVariableSet* dlv = deferred->at(1);
!       deferred->remove_at(1);

becomes
!       jvmtiDeferredLocalVariableSet* dlv = deferred->at(0);
!       deferred->remove_at(0);
                                     
2007-01-12



Hardware and Software, Engineered to Work Together