ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45499] New: DirectoryScanner infinitely recurses on symlinks to parent directories
Date Wed, 30 Jul 2008 02:04:25 GMT

           Summary: DirectoryScanner infinitely recurses on symlinks to
                    parent directories
           Product: Ant
           Version: 1.7.1
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Core

Created an attachment (id=22327)
 --> (
Patch to DirectoryScanner to prevent recursion on symlinks to ancestor dirs

I'm using Ant 1.7.1 on Mac OS X 10.5.4 with Java SE 6 (1.6.0_05).

When compiling some fairly basic Java source using the javac task I get
consistent OutOfMemoryErrors. Some debugging reveals that this is due to an
infinite recursion of directories in DirectoryScanner.

The Java framework installed on the Mac has a Home directory that emulates the
layout of a JRE on *nix/Windows, so apps (like Ant) that like to base things
off $JAVA_HOME can find things.

In Java 6, this Home directory has two symlinks to parent directories, namely:
bundle -> ../
shared_bundle -> ../../../
(This is a default install of the latest Java update for OS X 10.5 - I haven't
modified it in any way, so this issue will probably be an issue for all OS X

During the javac execution, DirectoryScanner seems to scan the $JAVA_HOME
directory (I haven't tried to ascertain why), resulting in an infinite
recursion on bundle -> Home -> bundle -> Home etc. etc., eventually ending in
an OOME.

I'm attaching a patch that resolves listed child directories to canonical paths
and checks if they're leaders of the currrent director, which fixes this issue.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message