SUGGESTED FIX
Suggested fix provided as a patch by the submitter:
The patch also fixes a minor flaw in globals.hpp
where the default value of the 'PrintAssemblyOptions' option, which is
of type 'ccstr', should really be "" instead of 'false'.
# HG changeset patch
# User Volker H. Simonis <###@###.###>
# Date 1220536147 -7200
# Node ID 9e103080d2dd8b4741fb22052dec954ed1192972
# Parent 5967ae2171f65055b4da7af918751d5a8d9e5f10
Fixed a regression in arguments.cpp which leads to a segmentation fault if an empty -XX option with an empty string argument (e.g. -XX:SyncKnobs= or -XX:SyncKnobs="") was given on the command line.
The regression must have appeared somewhere in HS 11, because Java 1.6.0_06 (which contains HS 10.0_b22) doesn't show the problem while both Java 1.6.0_10 (HS 11.0_b11) and Java 1.7.0-ea-b24 (HS 12.0_b01) as well as the latest OpenJDK snapshot (Rev. 292 with tag jdk7-b34) are affected.
At the same time I fixed a minor problem in globals.hpp where the default value of the 'PrintAssemblyOptions' option which is of type 'ccstr' should really be "" instead of 'false'.
diff -r 5967ae2171f6 -r 9e103080d2dd src/share/vm/runtime/arguments.cpp
--- a/src/share/vm/runtime/arguments.cpp Thu Aug 28 11:05:17 2008 -0700
+++ b/src/share/vm/runtime/arguments.cpp Thu Sep 04 15:49:07 2008 +0200
@@ -610,9 +610,6 @@ bool Arguments::parse_argument(const cha
if (flag->ccstr_accumulates()) {
return append_to_string_flag(name, value, origin);
} else {
- if (value[0] == '\0') {
- value = NULL;
- }
return set_string_flag(name, value, origin);
}
}
diff -r 5967ae2171f6 -r 9e103080d2dd src/share/vm/runtime/globals.hpp
--- a/src/share/vm/runtime/globals.hpp Thu Aug 28 11:05:17 2008 -0700
+++ b/src/share/vm/runtime/globals.hpp Thu Sep 04 15:49:07 2008 +0200
@@ -689,7 +689,7 @@ class CommandLineFlags {
diagnostic(bool, PrintAssembly, false, \
"Print assembly code (using external disassembler.so)") \
\
- diagnostic(ccstr, PrintAssemblyOptions, false, \
+ diagnostic(ccstr, PrintAssemblyOptions, "", \
"Options string passed to disassembler.so") \
\
diagnostic(bool, PrintNMethods, false, \
|