From 8379a071b6408db6a1089a3c079638719cf34acf Mon Sep 17 00:00:00 2001 From: Harold Seigel Date: Thu, 11 Jul 2013 12:59:03 -0400 Subject: [PATCH 1/4] 8016256: Make finalization final Add private methods to final methods check Reviewed-by: coleenp, acorn, ahgross --- hotspot/src/share/vm/classfile/classFileParser.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp index 65cd2333a9d..f764057f101 100644 --- a/hotspot/src/share/vm/classfile/classFileParser.cpp +++ b/hotspot/src/share/vm/classfile/classFileParser.cpp @@ -4481,9 +4481,8 @@ void ClassFileParser::check_final_method_override(instanceKlassHandle this_klass for (int index = 0; index < num_methods; index++) { Method* m = methods->at(index); - // skip private, static and methods - if ((!m->is_private()) && - (!m->is_static()) && + // skip static and methods + if ((!m->is_static()) && (m->name() != vmSymbols::object_initializer_name())) { Symbol* name = m->name(); From b2e34525abe6f046e30087a74b9c66200784a524 Mon Sep 17 00:00:00 2001 From: Sergey Gabdurakhmanov Date: Fri, 9 Aug 2013 11:03:33 +0400 Subject: [PATCH 2/4] 8020789: Disable exporting of gc.heap_dump diagnostic command Reviewed-by: fparain, ahgross --- hotspot/src/share/vm/services/diagnosticCommand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/services/diagnosticCommand.cpp b/hotspot/src/share/vm/services/diagnosticCommand.cpp index 79c922a8586..162010e425e 100644 --- a/hotspot/src/share/vm/services/diagnosticCommand.cpp +++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp @@ -48,7 +48,7 @@ void DCmdRegistrant::register_dcmds(){ DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); #if INCLUDE_SERVICES // Heap dumping/inspection supported - DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); + DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); #endif // INCLUDE_SERVICES From 1b5eaa621e907e871ba0637cb7510ae7795f94de Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Mon, 19 Aug 2013 17:47:21 +0200 Subject: [PATCH 3/4] 8015614: Update build settings Reviewed-by: tbell, dholmes, ahgross --- hotspot/make/windows/makefiles/compile.make | 9 +++++++-- hotspot/make/windows/makefiles/sa.make | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hotspot/make/windows/makefiles/compile.make b/hotspot/make/windows/makefiles/compile.make index 6f8dcce3406..93454d75399 100644 --- a/hotspot/make/windows/makefiles/compile.make +++ b/hotspot/make/windows/makefiles/compile.make @@ -180,6 +180,7 @@ DEBUG_OPT_OPTION = /Od PRODUCT_OPT_OPTION = /O2 /Oy- FASTDEBUG_OPT_OPTION = /O2 /Oy- DEBUG_OPT_OPTION = /Od +SAFESEH_FLAG = /SAFESEH !endif !if "$(COMPILER_NAME)" == "VS2005" @@ -198,6 +199,7 @@ LD_FLAGS = /manifest $(LD_FLAGS) $(BUFFEROVERFLOWLIB) !if "x$(MT)" == "x" MT=mt.exe !endif +SAFESEH_FLAG = /SAFESEH !endif !if "$(COMPILER_NAME)" == "VS2008" @@ -211,6 +213,7 @@ LD_FLAGS = /manifest $(LD_FLAGS) !if "x$(MT)" == "x" MT=mt.exe !endif +SAFESEH_FLAG = /SAFESEH !endif !if "$(COMPILER_NAME)" == "VS2010" @@ -240,9 +243,11 @@ LD_FLAGS = /manifest $(LD_FLAGS) !if "x$(MT)" == "x" MT=mt.exe !endif -!if "$(BUILDARCH)" == "i486" -LD_FLAGS = /SAFESEH $(LD_FLAGS) +SAFESEH_FLAG = /SAFESEH !endif + +!if "$(BUILDARCH)" == "i486" +LD_FLAGS = $(SAFESEH_FLAG) $(LD_FLAGS) !endif # If NO_OPTIMIZATIONS is defined in the environment, turn everything off diff --git a/hotspot/make/windows/makefiles/sa.make b/hotspot/make/windows/makefiles/sa.make index 9363f0e5e6f..356c4fd6b50 100644 --- a/hotspot/make/windows/makefiles/sa.make +++ b/hotspot/make/windows/makefiles/sa.make @@ -107,6 +107,9 @@ SA_LFLAGS = $(SA_LD_FLAGS) -nologo -subsystem:console -machine:$(MACHINE) !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1" SA_LFLAGS = $(SA_LFLAGS) -map -debug !endif +!if "$(BUILDARCH)" == "i486" +SA_LFLAGS = $(SAFESEH_FLAG) $(SA_LFLAGS) +!endif # Note that we do not keep sawindbj.obj around as it would then # get included in the dumpbin command in build_vm_def.sh From e412d7e8d119d5d23af15efecac7945f528a993f Mon Sep 17 00:00:00 2001 From: Ioi Lam Date: Sat, 24 Aug 2013 00:14:46 -0700 Subject: [PATCH 4/4] 8023683: Enhance class file parsing Use the value returned by REALLOC_RESOURCE_ARRAY() Reviewed-by: coleenp, ahgross --- hotspot/src/share/vm/classfile/classFileParser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp index e7b9c90363b..9ef6af65475 100644 --- a/hotspot/src/share/vm/classfile/classFileParser.cpp +++ b/hotspot/src/share/vm/classfile/classFileParser.cpp @@ -2178,8 +2178,8 @@ methodHandle ClassFileParser::parse_method(bool is_interface, } if (lvt_cnt == max_lvt_cnt) { max_lvt_cnt <<= 1; - REALLOC_RESOURCE_ARRAY(u2, localvariable_table_length, lvt_cnt, max_lvt_cnt); - REALLOC_RESOURCE_ARRAY(u2*, localvariable_table_start, lvt_cnt, max_lvt_cnt); + localvariable_table_length = REALLOC_RESOURCE_ARRAY(u2, localvariable_table_length, lvt_cnt, max_lvt_cnt); + localvariable_table_start = REALLOC_RESOURCE_ARRAY(u2*, localvariable_table_start, lvt_cnt, max_lvt_cnt); } localvariable_table_start[lvt_cnt] = parse_localvariable_table(code_length, @@ -2207,8 +2207,8 @@ methodHandle ClassFileParser::parse_method(bool is_interface, // Parse local variable type table if (lvtt_cnt == max_lvtt_cnt) { max_lvtt_cnt <<= 1; - REALLOC_RESOURCE_ARRAY(u2, localvariable_type_table_length, lvtt_cnt, max_lvtt_cnt); - REALLOC_RESOURCE_ARRAY(u2*, localvariable_type_table_start, lvtt_cnt, max_lvtt_cnt); + localvariable_type_table_length = REALLOC_RESOURCE_ARRAY(u2, localvariable_type_table_length, lvtt_cnt, max_lvtt_cnt); + localvariable_type_table_start = REALLOC_RESOURCE_ARRAY(u2*, localvariable_type_table_start, lvtt_cnt, max_lvtt_cnt); } localvariable_type_table_start[lvtt_cnt] = parse_localvariable_table(code_length,