Uploaded image for project: 'JikesRVM'
  1. JikesRVM
  2. RVM-1066

Parsing of -Xbootclasspath command line arguments leads to different results for different argument positions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 3.1.3
    • Fix Version/s: 3.1.4
    • Component/s: Runtime
    • Labels:
      None
    • Environment:

      All

      Description

      The code in processCommandLineArguments in RunBootImage.c starts to pass all options to the VM as soon as it fails to recognize one option. That is, it refrains from trying to handle any other options. The problem is that we have got some non-standard (i.e. -X) options that are handled by Java code. The C code treats those as if they were application arguments. This causes the results of the parsing to depend on the order of the arguments:

      rvm -Xbootclasspath/a:doesnotexist -Xmx1G
      

      will treat "-Xbootclasspath/a:doesnotexist" as application argument and print

      vm: "-Xmx1G" is not a recognized Jikes RVM command line argument
      

      while

      rvm -Xmx1G -Xbootclasspath/a:doesnotexist 
      

      will (correctly) print

      vm: Please specify a class to execute.
      vm:   You can invoke the VM with the "-help" flag for usage information.
      

      This is confusing and makes it harder to run the VM.

        Attachments

          Activity

            People

            • Assignee:
              ebrangs Erik Brangs
              Reporter:
              ebrangs Erik Brangs
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: