Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4826612

build/solaris/Makefile contains potentially infinite loop

XMLWordPrintable

    • generic
    • generic

      build/solaris/Makefile contains the following line that tries to
      find the root of the workspace (or the file system):

          # Unless GAMMADIR is set on the command line, search upward from
          # the current directory for a parent directory containing "src/share/vm".
          # If that fails, look for $GAMMADIR in the environment.
          # When the tree of subdirs is built, this setting is stored in each flags.make.
          GAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d src/share/vm ]&&pwd); do cd ..; done)

      which works fine as long as it finds a "src/share/vm" subdirectory,
      or backs up into a directory with a "dev" subdirectory. If we need
      that clause and we aren't in a filesystem with /dev at the root, we
      will loop forever, which seems to be what that clause is trying to
      prevent.

      This might be a problem, for example, if someone chroot'ed us into
      the directory where they wanted to do the build.

            Unassigned Unassigned
            pbk Peter Kessler
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: