<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - clang crashes on i386 when doing operations on uint128_t"
href="http://llvm.org/bugs/show_bug.cgi?id=15834">15834</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang crashes on i386 when doing operations on uint128_t
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sylvestre@debian.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=10416" name="attach_10416" title="Preprocessed source">attachment 10416</a> <a href="attachment.cgi?id=10416&action=edit" title="Preprocessed source">[details]</a></span>
Preprocessed source
With clang r180084 (from <a href="http://llvm.org/apt/">http://llvm.org/apt/</a>)
---
#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
<a href="http://bugs.debian.org/">http://bugs.debian.org/</a> 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:
********************</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>