--- a/hotspot/src/share/vm/memory/filemap.hpp Tue Oct 18 16:09:34 2016 +0000
+++ b/hotspot/src/share/vm/memory/filemap.hpp Mon Oct 10 20:50:33 2016 -0400
@@ -283,11 +283,15 @@
bool validate_classpath_entry_table();
static SharedClassPathEntry* shared_classpath(int index) {
+ if (index < 0) {
+ return NULL;
+ }
char* p = (char*)_classpath_entry_table;
p += _classpath_entry_size * index;
return (SharedClassPathEntry*)p;
}
static const char* shared_classpath_name(int index) {
+ assert(index >= 0, "Sanity");
return shared_classpath(index)->_name;
}