JDK-6346327 : JVMTI Doc: Clarify GetStackTrace when start_depth == 0
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-11-04
  • Updated: 2011-02-16
  • Resolved: 2006-02-22
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
6 b73Fixed
Description
In the spec for GetStackTrace, it says it will return an error if
start_depth >= stackDepth.

This means that for an empty stack (stackDepth ==0), it is impossible to
query the stack trace.

The RI  seems to have a special exemption for start_depth == 0 and
stackDepth ==0  to allow the "default" case (start_depth == 0) to work on
empty stacks.  Perhaps a clarification should be added to the spec for this
case (basically, always allow start_depth == 0, with no check against
stackDepth).

Comments
EVALUATION Should be clarified to state that these tests are only done when start_depth is non-zero.
04-11-2005

SUGGESTED FIX Currently states that JVMTI_ERROR_ILLEGAL_ARGUMENT is returned if -- start_depth is greater than or equal to stackDepth or start_depth is less than -stackDepth. Should be changed to -- start_depth is non-zero and start_depth is greater than or equal to stackDepth or start_depth is less than -stackDepth.
04-11-2005