Skip to content

Commit

Permalink
Merge pull request #16540 from ChengJin01/bcv_update_top_index_for_er…
Browse files Browse the repository at this point in the history
…ror_msg

Update the top index of the live stack in Verifier
  • Loading branch information
DanHeidinga authored Jan 12, 2023
2 parents fdab61d + edf8661 commit b8542b9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion runtime/bcverify/rtverify.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2022 IBM Corp. and others
* Copyright (c) 1991, 2023 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -2449,6 +2449,14 @@ verifyBytecodes (J9BytecodeVerificationData * verifyData)
}

_verifyError:
/* Update the top index of the live stack with the current top index given it is
* required to compute the number of elements on 'stack' in generating the detailed
* error messages in pushLiveStackToVerificationTypeBuffer() at errormessageframeworkrtv.c,
* especially when errorStackIndex points to the data type on 'locals' in terms of the
* loading operations.
*/
SAVE_STACKTOP(liveStack, stackTop);

/* Jazz 82615: Store the error code in the case of CHECK_STACK_UNDERFLOW */
if ((stackTop < stackBase) && (J9NLS_BCV_ERR_STACK_UNDERFLOW__ID == errorType)) {
/* Reset to the location of the 1st data type on 'stack' in the case of stack underflow to show up */
Expand Down

0 comments on commit b8542b9

Please sign in to comment.