8332935: Crash: assert(*lastPtr != 0) failed: Mismatched JNINativeInterface tables, check for new entries

Reviewed-by: dcubed, stuefe
This commit is contained in:
David Holmes
2024-06-02 20:08:17 +00:00
parent 4785461f61
commit 8338946a6d

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2295,7 +2295,7 @@ struct JNINativeInterface_* jni_functions_check() {
// make sure the last pointer in the checked table is not null, indicating
// an addition to the JNINativeInterface_ structure without initializing
// it in the checked table.
debug_only(int *lastPtr = (int *)((char *)&checked_jni_NativeInterface + \
debug_only(intptr_t *lastPtr = (intptr_t *)((char *)&checked_jni_NativeInterface + \
sizeof(*unchecked_jni_NativeInterface) - sizeof(char *));)
assert(*lastPtr != 0,
"Mismatched JNINativeInterface tables, check for new entries");