[LLVMbugs] [Bug 9646] New: fallback to -no-canonical-prefixes if canonicalization fails
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Apr 7 13:28:48 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9646
Summary: fallback to -no-canonical-prefixes if canonicalization
fails
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Driver
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nobled at dreamwidth.org
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6410)
--> (http://llvm.org/bugs/attachment.cgi?id=6410)
add fall back to -no-canonical-prefixes
GetMainExecutable() may fail, but the driver never checks its return value - so
even if it gets an empty path, the driver invocation goes ahead anyway and it
ends up like this:
"" -cc1 -triple i386-pc-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name test.cpp -mrelocation-model static -mdisable-fp-elim
-masm-verbose -mconstructor-aliases -target-cpu pentium4 -target-linker-version
2.20.51 -momit-leaf-frame-pointer -v -resource-dir ../lib/clang/3.0
-ferror-limit 19 -fmessage-length 80 -fcxx-exceptions -fexceptions
-fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o test.o -x c++
test.cpp
clang++: error: clang frontend command failed due to signal 127 (use -v to see
invocation)
which obviously doesn't work. The attached patch adds a fallback that acts as
if -no-canonical-prefixes was passed.
To reproduce this: it fails on Linux if it can't read
/proc/self/exe; e.g. if it's run in a chroot and
/proc isn't mounted.
This isn't a complete fix, since -no-canonical-prefixes
is still completely broken when running an installed
clang; see PR9576.
--
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.
More information about the llvm-bugs
mailing list