[LLVMbugs] [Bug 12769] New: unreachable executed in MCAssembler

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 8 16:57:45 PDT 2012


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

             Bug #: 12769
           Summary: unreachable executed in MCAssembler
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: weimingz at codeaurora.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8511
  --> http://llvm.org/bugs/attachment.cgi?id=8511
test case

when compile test_exit.c or test_exit.s or test_exit.ll with -mcpu=cortex-a9
-mthumb -integrated-as -c, clang crashes:

test_exit.c:3:3: note: please include the header <stdlib.h> or explicitly
      provide a declaration for 'exit'
UNREACHABLE executed!
0  clang           0x0000000001aa62bf
1  clang           0x0000000001aa800a
2  libpthread.so.0 0x00007fe4ec7bd8f0
3  libc.so.6       0x00007fe4ebaaca75 gsignal + 53
4  libc.so.6       0x00007fe4ebab05c0 abort + 384
5  clang           0x0000000001a90e74 llvm::llvm_unreachable_internal(char
const*, char const*, unsigned int) + 356
6  clang           0x00000000019132ab
7  clang           0x0000000001a2dbb9
8  clang           0x0000000001a3ff6b
llvm::MCAssembler::handleFixup(llvm::MCAsmLayout const&, llvm::MCFragment&,
llvm::MCFixup const&) + 123
9  clang           0x0000000001a415a1 llvm::MCAssembler::Finish() + 577
10 clang           0x0000000001505f27
llvm::AsmPrinter::doFinalization(llvm::Module&) + 1159
11 clang           0x00000000019f8479
llvm::FPPassManager::doFinalization(llvm::Module&) + 57
12 clang           0x00000000019ffbe9
llvm::FPPassManager::runOnModule(llvm::Module&) + 73
13 clang           0x00000000019ff79e
llvm::MPPassManager::runOnModule(llvm::Module&) + 462
14 clang           0x00000000019ff8ad llvm::PassManagerImpl::run(llvm::Module&)
+ 125
15 clang           0x0000000000768758
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 1544
16 clang           0x0000000000765f9c
17 clang           0x00000000008b3231 clang::ParseAST(clang::Sema&, bool, bool)
+ 481
18 clang           0x0000000000764e03 clang::CodeGenAction::ExecuteAction() +
51
19 clang           0x0000000000610b79
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 265
20 clang           0x00000000005fbc5c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1308
21 clang           0x00000000005f26b0 cc1_main(char const**, char const**, char
const*, void*) + 1056
22 clang           0x00000000005fac9c main + 6780
23 libc.so.6       0x00007fe4eba97c4d __libc_start_main + 253
24 clang           0x00000000005f02a9
Stack dump:
0.    Program arguments: /prj/llvm-arm/bin/clang -cc1 -triple
thumbv7-none-linux-gnueabi -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name test_exit.c -mrelocation-model static
-mdisable-fp-elim -mconstructor-aliases -target-abi aapcs-linux -target-cpu
cortex-a9 -mfloat-abi soft -target-feature +soft-float-abi -target-feature
+neon -target-linker-version 2.20.1 -momit-leaf-frame-pointer -coverage-file
test_exit.o -resource-dir /prj/llvm-arm/bin/../lib/clang/3.1 -isysroot
/prj/llvm-arm/gcc-4.6.1-cs/arm-2011.09 -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem
/prj/llvm-arm/home/common/build_tools/gcc-4.6.1-cs/arm-2011.09/usr/local/include
-internal-isystem /prj/llvm-arm/bin/../lib/clang/3.1/include
-internal-externc-isystem /prj/llvm-arm/gcc-4.6.1-cs/arm-2011.09/include
-internal-externc-isystem /prj/llvm-arm/gcc-4.6.1-cs/arm-2011.09/usr/include
-fdebug-compilation-dir /prj/llvm-arm/home/weimingz/peren/c -ferror-limit 19
-fmessage-length 80 -mstackrealign -fno-signed-char -fgnu-runtime
-fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi
-fdiagnostics-show-option -fcolor-diagnostics -o test_exit.o -x c test_exit.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'test_exit.c'.
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)

-- 
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