[llvm-bugs] [Bug 25648] New: Specifying invalid architecture for Linux as target calls unreachable

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Nov 25 19:46:53 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25648

            Bug ID: 25648
           Summary: Specifying invalid architecture for Linux as target
                    calls unreachable
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dsabogal.ufl at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Specifying invalid-linux as target calls unreachable

The issue arises when specifying the target with an invalid architecture for
Linux.

- invalid-*bsd issues the expected unknown target diagnostic
- invalid-linux results in the issue below


Output
======
$ clang -target invalid-linux test.c
Unexpected arch
UNREACHABLE executed at
/home/dsabogal/llvm/tools/clang/lib/Driver/Tools.cpp:8472!
0  clang           0x00000000026913de
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 46
1  clang           0x0000000002691859
2  clang           0x000000000268fac3 llvm::sys::RunSignalHandlers() + 131
3  clang           0x0000000002691ab4
4  libpthread.so.0 0x00007f800927cd60
5  libc.so.6       0x00007f800844f5f8 gsignal + 56
6  libc.so.6       0x00007f8008450a7a abort + 362
7  clang           0x0000000002621120 LLVMInstallFatalErrorHandler + 0
8  clang           0x0000000002d84eb5
9  clang           0x0000000002d83a45
10 clang           0x0000000002cf0b08
clang::driver::Driver::BuildJobsForAction(clang::driver::Compilation&,
clang::driver::Action const*, clang::driver::ToolChain const*, char const*,
bool, bool, char const*, clang::driver::InputInfo&) const + 4344
11 clang           0x0000000002ce8c52
clang::driver::Driver::BuildJobs(clang::driver::Compilation&) const + 1010
12 clang           0x0000000002ce3ca5
clang::driver::Driver::BuildCompilation(llvm::ArrayRef<char const*>) + 3989
13 clang           0x0000000000ac809b main + 5067
14 libc.so.6       0x00007f800843c610 __libc_start_main + 240
15 clang           0x0000000000ac6b79 _start + 41
Stack dump:
0.    Program arguments: /home/dsabogal/opt/llvm/bin/clang -target
invalid-linux test.c 
1.    Compilation construction
2.    Building compilation jobs
3.    Building compilation jobs
Aborted (core dumped)


Version
=======
This issue occurs on the few compilers that I've tried (3.7.0 and 3.8.0).

clang version 3.8.0 (trunk 253895)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
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/20151126/c5792841/attachment.html>


More information about the llvm-bugs mailing list