[LLVMbugs] [Bug 15834] New: clang crashes on i386 when doing operations on uint128_t

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 24 03:07:23 PDT 2013


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

            Bug ID: 15834
           Summary: clang crashes on i386 when doing operations on
                    uint128_t
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sylvestre at debian.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10416
  --> http://llvm.org/bugs/attachment.cgi?id=10416&action=edit
Preprocessed source

With clang r180084 (from http://llvm.org/apt/)

---
#include <stdint.h>
typedef unsigned uint128_t __attribute__((mode(TI)));
int main() {
  uint64_t a = ((uint64_t)2000000000) * 1000000000;
  uint64_t b = ((uint64_t)1234567890) << 24;
  uint128_t c = ((uint128_t)a) * b;
  return 0;
}
---
crashes with
$ clang foo.c 
0  libLLVM-3.3.so.1 0xf6f713bf llvm::sys::PrintStackTrace(_IO_FILE*) + 47
1  libLLVM-3.3.so.1 0xf6f7161f
2  libLLVM-3.3.so.1 0xf6f711d4
3  linux-gate.so.1  0xf77a3400 __kernel_sigreturn + 0
4  libLLVM-3.3.so.1 0xf6ea00a8 llvm::SelectionDAG::getNode(unsigned int,
llvm::DebugLoc, llvm::EVT, llvm::SDValue) + 2536
5  libLLVM-3.3.so.1 0xf6eb1dff
6  libLLVM-3.3.so.1 0xf6eb17b8
7  libLLVM-3.3.so.1 0xf6eb7a2f
llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&)
const + 3535
8  libLLVM-3.3.so.1 0xf6f088a7
llvm::TargetLowering::makeLibCall(llvm::SelectionDAG&, llvm::RTLIB::Libcall,
llvm::EVT, llvm::SDValue const*, unsigned int, bool, llvm::DebugLoc) const +
615
9  libLLVM-3.3.so.1 0xf6e2b54d
10 libLLVM-3.3.so.1 0xf6e34772
11 libLLVM-3.3.so.1 0xf6e44df4
12 libLLVM-3.3.so.1 0xf6e45b37 llvm::SelectionDAG::LegalizeTypes() + 903
13 libLLVM-3.3.so.1 0xf6eee73d llvm::SelectionDAGISel::CodeGenAndEmitDAG() +
205
14 libLLVM-3.3.so.1 0xf6eefd58
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 168
15 libLLVM-3.3.so.1 0xf6ef41f9
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 1801
16 libLLVM-3.3.so.1 0xf6ef58e0
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 640
17 libLLVM-3.3.so.1 0xf66ea5ee
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 126
18 libLLVM-3.3.so.1 0xf68c3a2c
llvm::FPPassManager::runOnFunction(llvm::Function&) + 620
19 libLLVM-3.3.so.1 0xf68c3a78 llvm::FPPassManager::runOnModule(llvm::Module&)
+ 56
20 libLLVM-3.3.so.1 0xf68c35a4 llvm::MPPassManager::runOnModule(llvm::Module&)
+ 596
21 libLLVM-3.3.so.1 0xf68c3722 llvm::PassManagerImpl::run(llvm::Module&) + 210
22 libLLVM-3.3.so.1 0xf68c37b6 llvm::PassManager::run(llvm::Module&) + 38
23 clang            0x0834e637
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 3799
24 clang            0x0834c25a
25 clang            0x084d0a45 clang::ParseAST(clang::Sema&, bool, bool) + 645
26 clang            0x081dbee8 clang::ASTFrontendAction::ExecuteAction() + 120
27 clang            0x0834b2f1 clang::CodeGenAction::ExecuteAction() + 33
28 clang            0x081dc438 clang::FrontendAction::Execute() + 168
29 clang            0x081bd885
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 261
30 clang            0x081a7197
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1463
31 clang            0x0819f230 cc1_main(char const**, char const**, char
const*, void*) + 1120
32 clang            0x081a608b main + 7435
33 libc.so.6        0xf5d9e5b5 __libc_start_main + 245
34 clang            0x0819ec11
Stack dump:
0.    Program arguments: /usr/bin/clang -cc1 -triple i386-pc-linux-gnu
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
foo.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -fuse-init-array -target-cpu pentium4
-target-linker-version 2.22 -resource-dir /usr/bin/../lib/clang/3.3
-internal-isystem /usr/local/include -internal-isystem
/usr/bin/../lib/clang/3.3/include -internal-isystem
/usr/include/clang/3.3/include/ -internal-externc-isystem
/usr/include/i386-linux-gnu -internal-externc-isystem
/usr/include/i486-linux-gnu -internal-externc-isystem /usr/include
-fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 90
-mstackrealign -fobjc-runtime=gcc -fobjc-default-synthesize-properties
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-o /tmp/foo-vOiFvg.o -x c foo.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'foo.c'.
4.    Running pass 'X86 DAG->DAG Instruction Selection' on function '@main'
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
Debian clang version 3.3-1~exp1 (trunk) (based on LLVM 3.3)
Target: i386-pc-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://bugs.debian.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/foo-mR92eq.c
clang: note: diagnostic msg: /tmp/foo-mR92eq.sh
clang: note: diagnostic msg: 

********************

-- 
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/20130424/951f0615/attachment.html>


More information about the llvm-bugs mailing list