File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -264,7 +264,9 @@ void VMStructs::init_constants() {
264264#ifdef DEBUG
265265void VMStructs::verify_offsets () {
266266 // Hotspot only
267- assert (VM::isHotspot ());
267+ if (!VM::isHotspot ()) {
268+ return ;
269+ }
268270 int hotspot_version = VM::hotspot_version ();
269271
270272// Verify type sizes
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ inline T* cast_to(const void* ptr) {
6868 public: \
6969 static uint64_t type_size () { return TYPE_SIZE_NAME (name); } \
7070 static name * cast (const void * ptr) { return cast_to<name>(ptr); } \
71+ static name * cast_raw (const void * ptr) { return (name *)ptr; } \
7172 static name * load_then_cast (const void * ptr) { \
7273 assert (ptr != nullptr ); \
7374 return cast (*(const void **)ptr); }
@@ -700,7 +701,7 @@ DECLARE(VMThread)
700701 }
701702
702703 static VMThread* fromJavaThread (JNIEnv* env, jthread thread) {
703- return VMThread::cast ((const void *)env->GetLongField (thread, _eetop));
704+ return VMThread::cast_raw ((const void *)env->GetLongField (thread, _eetop));
704705 }
705706
706707 static jlong javaThreadId (JNIEnv* env, jthread thread) {
You can’t perform that action at this time.
0 commit comments