Harmony
  1. Harmony
  2. HARMONY-6587

[drlvm] Maybe we should give one more try on the file given to a process.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0M15
    • Component/s: None
    • Labels:
      None
    • Environment:
      lunix drlvm
    • Patch Info:
      Patch Available

      Description

      Given a simple test case below:

      String[] cmmds = new String[]

      {"echo"}

      ; [0]
      ProcessBuilder pb = new ProcessBuilder(cmmds);
      Process p = pb.start();
      p.waitFor();
      System.out.println(p.exitValue());

      harmony + drlvm returns different from RI.

      The basic reason is:
      1. echo file does not contain the #! interpreter at the beginning
      2. drlvm return ENOEXEC because "An executable is not in a recognized format".

      Maybe we should give it another try: using '/bin/sh' to run the file.

      [0] echo is a simple file which contains a command. It will be attached.

      1. echo
        0.0 kB
        Li Jing Qin
      2. HARMONY-6587.diff
        3 kB
        Li Jing Qin

        Activity

        Hide
        Li Jing Qin added a comment -

        Verified. Thanks Mark.

        Show
        Li Jing Qin added a comment - Verified. Thanks Mark.
        Hide
        Hudson added a comment -

        Integrated in Harmony-1.5-head-linux-x86_64 #900 (See http://hudson.zones.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/900/)
        Apply patch from "HARMONY-6587 [drlvm] Maybe we should give one more try
        on the file given to a process".

        Show
        Hudson added a comment - Integrated in Harmony-1.5-head-linux-x86_64 #900 (See http://hudson.zones.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/900/ ) Apply patch from " HARMONY-6587 [drlvm] Maybe we should give one more try on the file given to a process".
        Hide
        Mark Hindess added a comment -

        I've applied your patch at r964805. It makes the assumption that the first exec attempt has validated the permissions but that seems like a reasonable assumption.

        Please confirm (by closing this JIRA) that your patch has been applied as expected.

        Show
        Mark Hindess added a comment - I've applied your patch at r964805. It makes the assumption that the first exec attempt has validated the permissions but that seems like a reasonable assumption. Please confirm (by closing this JIRA) that your patch has been applied as expected.
        Hide
        Li Jing Qin added a comment -

        Within the patch:
        1. Add the /bin/sh, give another try
        2. Add more free to free the malloc things.

        Show
        Li Jing Qin added a comment - Within the patch: 1. Add the /bin/sh, give another try 2. Add more free to free the malloc things.

          People

          • Assignee:
            Mark Hindess
            Reporter:
            Li Jing Qin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development