File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,13 +35,15 @@ inline T* cast_to(const void* ptr, uint64_t size) {
3535 public: \
3636 static uint64_t type_size () { return TYPE_SIZE_NAME (name); } \
3737 static name * cast (const void * ptr) { return cast_to<name>(ptr, type_size ()); } \
38- static name * load_then_cast (const void * ptr) { return cast (*(const void **)ptr); }
38+ static name * load_then_cast (const void * ptr) { \
39+ assert (ptr != nullptr ); \
40+ return cast (*(const void **)ptr); }
3941
4042#define DECL_TYPE_END };
4143
4244#define MATCH_SYMBOLS (...) __VA_ARGS__, nullptr
4345
44- // Define a type anme and its size symbols for VMStructs .
46+ // Defines a type and its matching symbols in vmStructs .
4547// A type may match multiple names in different JVM versions.
4648#define DECL_TYPES_DO (f ) \
4749 f (VMClassLoaderData, MATCH_SYMBOLS(" ClassLoaderData" )) \
You can’t perform that action at this time.
0 commit comments