http://llvm.org/bugs/show_bug.cgi?id=13511
Bug #: 13511
Summary: clang is unable to make temporary file when a
directory owned by another user with the same basename
as the file being compiled exists in /tmp
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Steps to reproduce:
$ cat test.c
int main(void) {
}
$ sudo mkdir /tmp/test
$ clang test.c
clang: error: unable to make temporary file: /tmp/test: can't make unique
filename: Permission denied
$ clang -v
clang version 3.2 (http://llvm.org/git/clang.git
207c408b14f0c29d65d6ad311456be94b812d5dd) (http://llvm.org/git/llvm.git
1c3781496081b47412fc70393bcdc5b67b440b02)
Target: x86_64-unknown-linux-gnu
Thread model: posix
It works fine if /tmp contains a file test owned by root instead of a directory
test:
$ sudo rmdir /tmp/test
$ sudo touch /tmp/test
$ clang test.c
This is caused by Path::makeUnique trying to make a unique directory *in* path
if path is a directory instead of making path unique (line 829 and further in
llvm/lib/Support/Unix/Path.inc).
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs