RFR (S) 8205608: Fix 'frames()' in ThreadReferenceImpl.c to prevent quadratic runtime behavior
Schmelter, Ralf
ralf.schmelter at sap.com
Fri Jul 13 13:22:54 UTC 2018
Hi Serguei,
Sorry for the late reply, but it seems the spam filter has removed your emails. I just saw them in the archives.
Regarding this code:
288 if (length != count) {
289 error = JVMTI_ERROR_INTERNAL;
290 }
count is the number of frames filled into the array (it is set in the GetStackTrace JVMTI call) and length is the number of frames requested to be filled in. Both are independent of the start index at this point. Note that I've reused the count variable (it was first initialized to hold the number of frames on the stack). Maybe it is clearer to use a new variable in this call?
The package will not be send if an error code is set on the output stream (see outStream_sendReply()). This should cover all cases (in both the new and the old code).
Best regards,
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20180713/f76c1d9a/attachment.html>
More information about the serviceability-dev
mailing list