[LLVMbugs] [Bug 20539] New: lld crashes when linking x86_64 Mach-O file

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 5 00:06:19 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20539

            Bug ID: 20539
           Summary: lld crashes when linking x86_64 Mach-O file
           Product: lld
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: alexchandel at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12857
  --> http://llvm.org/bugs/attachment.cgi?id=12857&action=edit
test.c, a harmless C file

For some `test.o`, compiled with `clang -c test.c`, running the command,

  `lld -flavor darwin test.o`

fails with the following build output:

```
Unknown arch
UNREACHABLE executed at ArchHandler.cpp:46!
0  libLLVM-3.6svn.dylib     0x000000010ececf37
llvm::sys::PrintStackTrace(__sFILE*) + 40
1  libLLVM-3.6svn.dylib     0x000000010eced322 SignalHandler(int) + 248
2  libsystem_platform.dylib 0x00007fff975c95aa _sigtramp + 26
3  libsystem_platform.dylib 0x00007f9cfac00000 _sigtramp + 1667459696
4  libLLVM-3.6svn.dylib     0x000000010eced189 abort + 22
5  libLLVM-3.6svn.dylib     0x000000010ecdb673 LLVMInstallFatalErrorHandler + 0
6  lld                      0x000000010e064149
7  lld                      0x000000010e06a928
8  lld                      0x000000010e06cccb
9  lld                      0x000000010e04cca4
10 lld                      0x000000010e055315
11 lld                      0x000000010e04bbc0
12 libdyld.dylib            0x00007fff96afc5fd start + 1
13 libdyld.dylib            0x0000000000000004 start + 1766865416
Stack dump:
0.    Program arguments: /usr/local/opt/llvm/bin/lld -flavor darwin test.o 
Illegal instruction: 4
```

Only the flags `-flavor darwin` could be passed, because LLD did not recognize
the `-target` flag when it was passed, nor did it work without the `-flavor`
flag.

This is using the lld HEAD, llvm HEAD, and clang HEAD, 2014-07-05, (llvm
3.6.0pre). However I saw this same error at least a month ago.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140805/dab4c611/attachment.html>


More information about the llvm-bugs mailing list