7179701: MaxJavaStackTraceDepth of zero is not handled correctly/consistently in the VM

Value of zero means unlimited stack trace.  If you want no stack trace, use -XX:-StackTraceInThrowable

Reviewed-by: dholmes, hseigel
This commit is contained in:
Coleen Phillimore 2018-01-31 11:07:55 -05:00
parent 0a10af4b06
commit 7660d97e2e
5 changed files with 112 additions and 11 deletions

View file

@ -1968,7 +1968,7 @@ void java_lang_Throwable::fill_in_stack_trace(Handle throwable, const methodHand
bool skip_throwableInit_check = false;
bool skip_hidden = !ShowHiddenFrames;
for (frame fr = thread->last_frame(); max_depth != total_count;) {
for (frame fr = thread->last_frame(); max_depth == 0 || max_depth != total_count;) {
Method* method = NULL;
int bci = 0;