Disallow flags with extra characters appended

Jesper Wilhelmsson jesper.wilhelmsson at oracle.com
Fri Dec 5 01:38:57 UTC 2014


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).

I have a suggestion for a fix here:

Would this be an acceptable solution?

I couldn't find one, but since this has been around for quite some time I wonder 
if there is a bug for this already. If not I'll create one.


More information about the hotspot-dev mailing list