United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7162488 VM not printing unknown -XX options
JDK-7162488 : VM not printing unknown -XX options

Details
Type:
Bug
Submit Date:
2012-04-18
Status:
Closed
Updated Date:
2013-04-25
Project Name:
JDK
Resolved Date:
2012-08-29
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P1
Resolution:
Fixed
Affected Versions:
hs23,7u4
Fixed Versions:
7u40 (b08)

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
If unknown -XX options passed to JVM from JDK 7u5 b02 then it only prints message about fatal exception:
/export/jdk/jdk1.7.0_05b02/bin/java -XX:unknownFlag 
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

With previous builds JVM also printing information about unknown options:
/export/jdk/jdk1.7.0_05b01/bin/java -XX:unknownFlag
Unrecognized VM option 'unknownFlag'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Unrecognized options reporting works with any previous updates, JDK 1.7.0 FCS and with JDK 7u5 b01.

No information about unknown options printed using -XX:Flags=<file with unknown options> too.
That fact causing runtime/7110720/Test7110720.sh test failures:
http://vice.russia.sun.com/results/1.7.0_05/b02/vm/win2008r2-x64-32_hs/workDir/runtime/7110720/Test7110720.jtr

                                    

Comments
EVALUATION

In src/share/vm/runtime/arguments.cpp we need to do something when locked_flag is null, e.g.

$ hg diff  src/share/vm/runtime/arguments.cpp                                             
diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp
--- a/src/share/vm/runtime/arguments.cpp
+++ b/src/share/vm/runtime/arguments.cpp
@@ -829,6 +829,9 @@
     } else {
       jio_fprintf(defaultStream::error_stream(), "%s", locked_message_buf);
     }
+  } else {
+    jio_fprintf(defaultStream::error_stream(),
+                "Unrecognized VM option '%s'\n", argname); 
   }
 
   // allow for commandline "commenting out" options like -XX:#+Verbose
                                     
2012-04-18
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/f3a4ee95783b
                                     
2012-04-20
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/f3a4ee95783b
                                     
2012-05-02
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/f3a4ee95783b
                                     
2012-06-29
EVALUATION

http://hg.openjdk.java.net/hsx/hsx23.4/hotspot/rev/037c44a259bc
                                     
2012-08-23
Verified with jdk7u12-b01
                                     
2012-10-13
URL:   http://hg.openjdk.java.net/jdk7u/jdk7u-dev/hotspot/rev/f3a4ee95783b
User:  amurillo
Date:  2012-11-07 19:08:46 +0000

                                     
2012-11-07
/test: http://hg.openjdk.java.net/jdk7u/jdk7u-dev/hotspot/rev/f3a4ee95783b
                                     
2012-12-06
URL:   http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/rev/f3f34d00d977
User:  lana
Date:  2012-12-28 18:17:46 +0000

                                     
2012-12-28



Hardware and Software, Engineered to Work Together