Skip to content

Commit 4d07893

Browse files
committed
8317331: Solaris build failed with "declaration can not follow a statement (E_DECLARATION_IN_CODE)"
Backport-of: 852276d1f833d49802693f2a5a82ba6eb2722de6
1 parent 08980a0 commit 4d07893

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/java.base/share/native/libverify/check_code.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,12 +1678,13 @@ static int instruction_length(unsigned char *iptr, unsigned char *end)
16781678
switch (instruction) {
16791679
case JVM_OPC_tableswitch: {
16801680
int *lpc = (int *)UCALIGN(iptr + 1);
1681+
int64_t low, high, index;
16811682
if (lpc + 2 >= (int *)end) {
16821683
return -1; /* do not read pass the end */
16831684
}
1684-
int64_t low = _ck_ntohl(lpc[1]);
1685-
int64_t high = _ck_ntohl(lpc[2]);
1686-
int64_t index = high - low;
1685+
low = _ck_ntohl(lpc[1]);
1686+
high = _ck_ntohl(lpc[2]);
1687+
index = high - low;
16871688
// The value of low must be less than or equal to high - i.e. index >= 0
16881689
if ((index < 0) || (index > 65535)) {
16891690
return -1; /* illegal */

0 commit comments

Comments
 (0)