<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 --- - Invalid constraint in asm crashes"
href="http://llvm.org/bugs/show_bug.cgi?id=15759">15759</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Invalid constraint in asm crashes
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bruce.mitchener@gmail.com
</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=10355" name="attach_10355" title="Example C file for the bug">attachment 10355</a> <a href="attachment.cgi?id=10355&action=edit" title="Example C file for the bug">[details]</a></span>
Example C file for the bug
Attached sample causes compiler crash:
batavia:invalid_asm_constraint bruce$ /usr/local/bin/clang -o test.o -c test.c
Assertion failed: (Verify(getFunctionType(), constraints) && "Function type not
legal for constraints!"), function InlineAsm, file InlineAsm.cpp, line 47.
0 clang 0x000000010fc6b656 char const* std::__find<char const*,
char>(char const*, char const*, char const&, std::random_access_iterator_tag) +
3494
1 clang 0x000000010fc6b9e9 char const* std::__find<char const*,
char>(char const*, char const*, char const&, std::random_access_iterator_tag) +
4409
2 libsystem_c.dylib 0x00007fff95e088ea _sigtramp + 26
3 libsystem_c.dylib 000000000000000000 _sigtramp + 18446603338001643312
4 clang 0x000000010fc6b861 char const* std::__find<char const*,
char>(char const*, char const*, char const&, std::random_access_iterator_tag) +
4017
5 clang 0x000000010fc6b84b char const* std::__find<char const*,
char>(char const*, char const*, char const&, std::random_access_iterator_tag) +
3995
6 clang 0x000000010fbde5d0 void*
llvm::object_creator<llvm::sys::SmartRWMutex<true> >() + 6342
7 clang 0x000000010fbdff8f
std::_Rb_tree<std::pair<llvm::PointerType*, llvm::InlineAsmKeyType>,
std::pair<std::pair<llvm::PointerType*, llvm::InlineAsmKeyType> const,
llvm::InlineAsm*>, std::_Select1st<std::pair<std::pair<llvm::PointerType*,
llvm::InlineAsmKeyType> const, llvm::InlineAsm*> >,
std::less<std::pair<llvm::PointerType*, llvm::InlineAsmKeyType> >,
std::allocator<std::pair<std::pair<llvm::PointerType*, llvm::InlineAsmKeyType>
const, llvm::InlineAsm*> > >::find(std::pair<llvm::PointerType*,
llvm::InlineAsmKeyType> const&) + 1025
8 clang 0x000000010fbdfcef
std::_Rb_tree<std::pair<llvm::PointerType*, llvm::InlineAsmKeyType>,
std::pair<std::pair<llvm::PointerType*, llvm::InlineAsmKeyType> const,
llvm::InlineAsm*>, std::_Select1st<std::pair<std::pair<llvm::PointerType*,
llvm::InlineAsmKeyType> const, llvm::InlineAsm*> >,
std::less<std::pair<llvm::PointerType*, llvm::InlineAsmKeyType> >,
std::allocator<std::pair<std::pair<llvm::PointerType*, llvm::InlineAsmKeyType>
const, llvm::InlineAsm*> > >::find(std::pair<llvm::PointerType*,
llvm::InlineAsmKeyType> const&) + 353
9 clang 0x000000010fbdef8d void*
llvm::object_creator<llvm::sys::SmartRWMutex<true> >() + 8835
10 clang 0x000000010fbde4b9 void*
llvm::object_creator<llvm::sys::SmartRWMutex<true> >() + 6063
11 clang 0x000000010ef45151 std::vector<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*>, std::allocator<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<unsigned int,</span >
clang::CodeGen::CGBitFieldInfo const*>*, std::vector<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*>, std::allocator<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> > > >, std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> const&) + 15719
12 clang 0x000000010ef424c7 std::vector<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*>, std::allocator<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<unsigned int,</span >
clang::CodeGen::CGBitFieldInfo const*>*, std::vector<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*>, std::allocator<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> > > >, std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> const&) + 4317
13 clang 0x000000010ef45f73 std::vector<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*>, std::allocator<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<unsigned int,</span >
clang::CodeGen::CGBitFieldInfo const*>*, std::vector<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*>, std::allocator<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> > > >, std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> const&) + 19337
14 clang 0x000000010ef42929 std::vector<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*>, std::allocator<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<unsigned int,</span >
clang::CodeGen::CGBitFieldInfo const*>*, std::vector<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*>, std::allocator<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> > > >, std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> const&) + 5439
15 clang 0x000000010ef423c3 std::vector<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*>, std::allocator<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<unsigned int,</span >
clang::CodeGen::CGBitFieldInfo const*>*, std::vector<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*>, std::allocator<std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> > > >, std::pair<unsigned int,
clang::CodeGen::CGBitFieldInfo const*> const&) + 4057
16 clang 0x000000010ef4ffb4 std::vector<std::pair<unsigned int,
unsigned int>, std::allocator<std::pair<unsigned int, unsigned int> >
<span class="quote">>::operator=(std::vector<std::pair<unsigned int, unsigned int>,</span >
std::allocator<std::pair<unsigned int, unsigned int> > > const&) + 8610
17 clang 0x000000010ef502c0 std::vector<std::pair<unsigned int,
unsigned int>, std::allocator<std::pair<unsigned int, unsigned int> >
<span class="quote">>::operator=(std::vector<std::pair<unsigned int, unsigned int>,</span >
std::allocator<std::pair<unsigned int, unsigned int> > > const&) + 9390
18 clang 0x000000010ef574d3 std::vector<std::pair<unsigned int,
unsigned int>, std::allocator<std::pair<unsigned int, unsigned int> >
<span class="quote">>::operator=(std::vector<std::pair<unsigned int, unsigned int>,</span >
std::allocator<std::pair<unsigned int, unsigned int> > > const&) + 38593
19 clang 0x000000010ef551e3 std::vector<std::pair<unsigned int,
unsigned int>, std::allocator<std::pair<unsigned int, unsigned int> >
<span class="quote">>::operator=(std::vector<std::pair<unsigned int, unsigned int>,</span >
std::allocator<std::pair<unsigned int, unsigned int> > > const&) + 29649
20 clang 0x000000010ef568e0 std::vector<std::pair<unsigned int,
unsigned int>, std::allocator<std::pair<unsigned int, unsigned int> >
<span class="quote">>::operator=(std::vector<std::pair<unsigned int, unsigned int>,</span >
std::allocator<std::pair<unsigned int, unsigned int> > > const&) + 35534
21 clang 0x000000010ef5ac4f std::vector<std::pair<unsigned int,
unsigned int>, std::allocator<std::pair<unsigned int, unsigned int> >
<span class="quote">>::operator=(std::vector<std::pair<unsigned int, unsigned int>,</span >
std::allocator<std::pair<unsigned int, unsigned int> > > const&) + 52797
22 clang 0x000000010ef6f6fd std::vector<std::pair<llvm::WeakVH,
llvm::Constant*>, std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::WeakVH,</span >
llvm::Constant*>*, std::vector<std::pair<llvm::WeakVH, llvm::Constant*>,
std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> > > >,
std::pair<llvm::WeakVH, llvm::Constant*> const&) + 4031
23 clang 0x000000010ef4d998 std::vector<clang::CXXRecordDecl
const*, std::allocator<clang::CXXRecordDecl const*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CXXRecordDecl const**,</span >
std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl
const*> > >, clang::CXXRecordDecl const* const&) + 6328
24 clang 0x000000010ef7b816 std::vector<std::pair<llvm::WeakVH,
llvm::Constant*>, std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> >
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::WeakVH,</span >
llvm::Constant*>*, std::vector<std::pair<llvm::WeakVH, llvm::Constant*>,
std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> > > >,
std::pair<llvm::WeakVH, llvm::Constant*> const&) + 53464
25 clang 0x000000010ef4d019 std::vector<clang::CXXRecordDecl
const*, std::allocator<clang::CXXRecordDecl const*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CXXRecordDecl const**,</span >
std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl
const*> > >, clang::CXXRecordDecl const* const&) + 3897
26 clang 0x000000010edbac36 std::_Rb_tree<clang::edit::FileOffset,
std::pair<clang::edit::FileOffset const, clang::edit::EditedSource::FileEdit>,
std::_Select1st<std::pair<clang::edit::FileOffset const,
clang::edit::EditedSource::FileEdit> >, std::less<clang::edit::FileOffset>,
std::allocator<std::pair<clang::edit::FileOffset const,
clang::edit::EditedSource::FileEdit> >
<span class="quote">>::_M_erase(std::_Rb_tree_node<std::pair<clang::edit::FileOffset const,</span >
clang::edit::EditedSource::FileEdit> >*) + 3676
27 clang 0x000000010eda3699 std::vector<clang::CompilerInstance*,
std::allocator<clang::CompilerInstance*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CompilerInstance**,</span >
std::vector<clang::CompilerInstance*, std::allocator<clang::CompilerInstance*>
<span class="quote">> >, clang::CompilerInstance* const&) + 11177</span >
28 clang 0x000000010ed7b1fa std::_Rb_tree<std::string, std::string,
std::_Identity<std::string>, std::less<std::string>,
std::allocator<std::string> >::_M_insert_unique(std::string const&) + 3802
29 clang 0x000000010ed750bc
30 clang 0x000000010ed79c50 std::vector<std::string,
std::allocator<std::string>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::string*,</span >
std::vector<std::string, std::allocator<std::string> > >, std::string const&) +
7350
31 libdyld.dylib 0x00007fff8c69f7e1 start + 0
Stack dump:
0. Program arguments: /usr/local/Cellar/llvm/3.2/bin/clang -cc1 -triple
x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -main-file-name
test.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 136 -coverage-file
/Users/bruce/Development/llvm_bugs/invalid_asm_constraint/test.o -resource-dir
/usr/local/Cellar/llvm/3.2/bin/../lib/clang/3.2 -fmodule-cache-path
/var/folders/pj/fcfyqt6n2r5cjygxgtnfmv7h0000gn/T/clang-module-cache
-fdebug-compilation-dir
/Users/bruce/Development/llvm_bugs/invalid_asm_constraint -ferror-limit 19
-fmessage-length 204 -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime=macosx-10.8.0 -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fencode-extended-block-signature
-fdiagnostics-show-option -fcolor-diagnostics -o test.o -x c test.c
1. test.c:7:1: current parser token 'int'
2. test.c:1:8: LLVM IR generation of declaration 'get'
3. test.c:1:8: Generating code for declaration 'get'
4. test.c:1:14: LLVM IR generation of compound statement ('{}')
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (tags/RELEASE_32/final)
Target: x86_64-apple-darwin12.2.1
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
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>