RFR [XS] - 8139026 hotspot.script cannot handle command-line arguments with spaces

Ioi Lam ioi.lam at oracle.com
Mon Oct 26 05:34:48 UTC 2015


Please review a very small fix:

http://cr.openjdk.java.net/~iklam/8139026-hotspot-script-arg-quoating/

Bug: hotspot/make/hotspot.script cannot handle command-line arguments 
with spaces

https://bugs.openjdk.java.net/browse/JDK-8139026

Summary of fix:

    The old script was adding $@ to a string like X="A B $@ C". Doing 
that would
    lose the quotation on the arguments. This would cause JTREG to fail 
when running
    with Jigsaw modules (see bug report for details).

    The fix is to pass "$@" directly as arguments to all programs 
launched by
    hotspot.script

    Note that the fix does not address the problem with DBX, but at 
least it's no worse
    than before.

Tests:

     I have used the modified version for the past 2 weeks with GDB and 
JTREG and found
     no issues.

     Also, casual testing shows the quotation is retained:

     $ hotspot 'a a'
     Error: Could not find or load main class a a
     $ hotspot "a' a"
     Error: Could not find or load main class a' a
     $ hotspot "a\"' a"
     Error: Could not find or load main class a"' a

Thanks
- Ioi



More information about the build-dev mailing list