RFR: 6522873 - Java not print "Unrecognized option" when it is invalid option.
Jesper Wilhelmsson
jesper.wilhelmsson at oracle.com
Fri Dec 5 13:39:42 UTC 2014
Hi,
Please review this patch to make argument parsing stop accepting random
characters at the end of command line flags. This topic was discussed in
hotspot-dev at openjdk.java.net and I strongly believe that this bug should be
reopened and fixed.
Short summary of the problem:
Today some (not all) flags are accepted even though they have random characters
appended to them. Some examples are -Xconcgc, -Xcomp, -Xboundthreads,
-XX:+AlwaysTenure etc which will also be accepted when written for instance
-Xconcgcnoway, -Xcomposer, -Xboundthreadstodogs or -XX:+AlwaysTenureAtBlueMoon
There is a potential problem here since we will also accept things like
-XX:+ExtendedDTraceProbes-XX:+UseG1GC without saying a word (and of course
without running with G1).
Bug: https://bugs.openjdk.java.net/browse/JDK-6522873
Webrev: http://cr.openjdk.java.net/~jwilhelm/6522873/webrev.00/
The full list of flags affected by this change is:
-Xnoclassgc
-Xconcgc
-Xnoconcgc
-Xbatch
-green
-native
-Xsqnopause
-Xrs
-Xusealtsigs
-Xoptimize
-Xprof
-Xconcurrentio
-Xinternalversion
-Xprintflags
-Xint
-Xmixed
-Xcomp
-Xshare:dump
-Xshare:on
-Xshare:auto
-Xshare:off
-Xdebug
-Xnoagent
-Xboundthreads
vfprintf
exit
abort
-XX:+AggressiveHeap
-XX:+NeverTenure
-XX:+AlwaysTenure
-XX:+CMSPermGenSweepingEnabled
-XX:-CMSPermGenSweepingEnabled
-XX:+UseGCTimeLimit
-XX:-UseGCTimeLimit
-XX:+ResizeTLE
-XX:-ResizeTLE
-XX:+PrintTLE
-XX:-PrintTLE
-XX:+UseTLE
-XX:-UseTLE
-XX:+DisplayVMOutputToStderr
-XX:+DisplayVMOutputToStdout
-XX:+ExtendedDTraceProbes
-XX:+FullGCALot
-XX:+ManagementServer
-XX:+PrintVMOptions
-XX:-PrintVMOptions
-XX:+IgnoreUnrecognizedVMOptions
-XX:-IgnoreUnrecognizedVMOptions
-XX:+PrintFlagsInitial
-XX:+PrintFlagsWithComments
Thanks,
/Jesper
More information about the hotspot-runtime-dev
mailing list