[PATCH] Always append -XXXXXX in Path::makeUnique , fixes bug 13511

Jordy Potman jordy.potman.recore at gmail.com
Wed Jan 30 00:52:56 PST 2013


On 11/06/2012 12:56 PM, Jordy Potman wrote:
> Hi,
>
> Path::makeUnique fails if a directory with the same name as the path
> that has to be made unique already exists and that directory is not
> writable, because it tries to make a subdirectory in that directory. See
> bug 13511 [1].
>
> The attached patch fixes this by removing the directory test so -XXXXXX
> is always appended to the path, because I personally do not see the need
> for making directories a special case. The special case for directories
> was introduced in revision 53929 [2], but the commit message does not
> explain why.
>
> I have ran the nightly test suite with the patch applied and I do not
> see any differences in the test results compared to the test results
> without the patch.
>
> Please review the patch and commit it if it looks good.
>
> Thanks,
>
> Jordy
>
> [1] http://llvm.org/bugs/show_bug.cgi?id=13511
> [2] http://llvm.org/viewvc/llvm-project?view=rev&revision=53929
>

I keep running into this issue because I have users on a shared machine 
who like to make directories in /tmp with a commonly used name and other 
users on the same machine who like to compile files which have the same 
base name as the directory.

Can someone with knowledge of lib/Support/Unix/Path.inc please check if 
the patch of the original message fixes this in the right way?

Thanks,

Jordy




More information about the llvm-commits mailing list