[LLVMbugs] [Bug 11649] New: Crash in 'ObjC ARC optimization' pass
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Dec 23 14:11:02 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11649
Bug #: 11649
Summary: Crash in 'ObjC ARC optimization' pass
Product: clang
Version: 3.0
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: paul.q.stevenson at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The latest development tree results in a crash when trying to compile the
function below with -O2. The same crash can be observed when cherry-picking
commit 59a1c93e955c366084742ceca65e7b1afd8772ac to the 3.0 tree (to fix an ARC
double-release)
@interface TestObj
+ (TestObj *)obj;
- (BOOL)predicate:(int)val;
@end
void Func()
{
TestObj *obj = [TestObj obj];
BOOL flag1 = NO;
BOOL flag2 = [obj predicate:0];
int val = 0;
if (![obj predicate:0])
return;
for (;; val++) {
if ([obj predicate:0]) {
flag2 = NO;
if ([obj predicate:0]) {
flag1 = YES;
continue;
}
}
if ([obj predicate:val])
break;
val++;
}
}
Crash output:
0 clang 0x00000001085bebf2
llvm::SmallVectorImpl<llvm_regmatch_t>::resize(unsigned int) + 2082
1 clang 0x00000001085bf1d9
llvm::SmallVectorImpl<llvm_regmatch_t>::resize(unsigned int) + 3593
2 libsystem_c.dylib 0x00007fff97281cfa _sigtramp + 26
3 libsystem_c.dylib 0x00007fff9724a00e szone_malloc_should_clear + 1115
4 clang 0x00000001082d4d49 void
llvm::SmallVectorImpl<llvm::User*>::append<llvm::value_use_iterator<llvm::User>
>(llvm::value_use_iterator<llvm::User>, llvm::value_use_iterator<llvm::User>) +
28073
5 clang 0x000000010851e9ed llvm::cl::parser<llvm::PassInfo
const*>::~parser() + 22237
6 clang 0x00000001083af32e std::vector<std::pair<llvm::WeakVH,
llvm::CallGraphNode*>, std::allocator<std::pair<llvm::WeakVH,
llvm::CallGraphNode*> >
>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::WeakVH,
llvm::CallGraphNode*>*, std::vector<std::pair<llvm::WeakVH,
llvm::CallGraphNode*>, std::allocator<std::pair<llvm::WeakVH,
llvm::CallGraphNode*> > > >, std::pair<llvm::WeakVH, llvm::CallGraphNode*>
const&) + 5310
7 clang 0x000000010851edb9 llvm::cl::parser<llvm::PassInfo
const*>::~parser() + 23209
8 clang 0x000000010851f3c2 llvm::cl::parser<llvm::PassInfo
const*>::~parser() + 24754
9 clang 0x000000010851f91d llvm::cl::parser<llvm::PassInfo
const*>::~parser() + 26125
10 clang 0x00000001072ee90a llvm::DenseMap<clang::FileEntry const*,
clang::serialization::Module*, llvm::DenseMapInfo<clang::FileEntry const*>,
llvm::DenseMapInfo<clang::serialization::Module*> >::grow(unsigned int) + 5082
11 clang 0x00000001073d4e96
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 278
12 clang 0x00000001073f7c1b clang::CUDAGlobalAttr*
clang::Decl::getAttr<clang::CUDAGlobalAttr>() const + 891
13 clang 0x00000001073d3d8c
llvm::DenseMap<llvm::ValueMapCallbackVH<llvm::Value const*,
llvm::TrackingVH<llvm::Value>, llvm::ValueMapConfig<llvm::Value const*>,
llvm::DenseMapInfo<llvm::TrackingVH<llvm::Value> > >,
llvm::TrackingVH<llvm::Value>,
llvm::DenseMapInfo<llvm::ValueMapCallbackVH<llvm::Value const*,
llvm::TrackingVH<llvm::Value>, llvm::ValueMapConfig<llvm::Value const*>,
llvm::DenseMapInfo<llvm::TrackingVH<llvm::Value> > > >,
llvm::DenseMapInfo<llvm::TrackingVH<llvm::Value> > >::init(unsigned int) + 3660
14 clang 0x00000001071c759b llvm::DenseMap<clang::IdentifierInfo
const*, unsigned int, llvm::DenseMapInfo<clang::IdentifierInfo const*>,
llvm::DenseMapInfo<unsigned int> >::grow(unsigned int) + 14299
15 clang 0x00000001071b14e5 llvm::SmallVectorImpl<char
const*>::insert(char const**, char const* const&) + 3013
16 clang 0x00000001071a98fb
17 clang 0x00000001071ad7a1 std::vector<std::string,
std::allocator<std::string>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::string*,
std::vector<std::string, std::allocator<std::string> > >, std::string const&) +
1553
18 clang 0x00000001071a8434
Stack dump:
0.
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module '...'.
4. Running pass 'ObjC ARC optimization' on function '@Func'
--
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