Skip to content

Commit

Permalink
8332935: Crash: assert(*lastPtr != 0) failed: Mismatched JNINativeInt…
Browse files Browse the repository at this point in the history
…erface tables, check for new entries

Backport-of: 9069982
  • Loading branch information
vieiro authored and TheRealMDoerr committed Nov 18, 2024
1 parent 82a609d commit d0949c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/prims/jniCheck.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2021, 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
Expand Down Expand Up @@ -2316,7 +2316,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");
Expand Down

0 comments on commit d0949c8

Please sign in to comment.