<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Infinite loop in ARC destructor for C struct"
href="https://bugs.llvm.org/show_bug.cgi?id=41206">41206</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Infinite loop in ARC destructor for C struct
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>smeenai@fb.com
</td>
</tr>
<tr>
<th>CC</th>
<td>ahatanak@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk, rjmccall@apple.com
</td>
</tr></table>
<p>
<div>
<pre>$ cat /tmp/reduced.m
@class I;
typedef struct {
I *name;
} Foo;
typedef struct {
Foo foo;
} Bar;
I *getI();
void f() {
Foo foo = {getI()};
Bar bar = {foo};
}
$ clang -cc1 -triple x86_64-apple-ios12.1.0 -fobjc-arc -emit-llvm -o -
/tmp/reduced.m
...
define linkonce_odr hidden void @__destructor_8_s0(i8** %dst) #3 {
entry:
%dst.addr = alloca i8**, align 8
store i8** %dst, i8*** %dst.addr, align 8
%0 = load i8**, i8*** %dst.addr, align 8
call void @__destructor_8_s0(i8** %0) #2
ret void
}
...
__destructor_8_s0 has an unconditional call to itself, resulting in an infinite
loop.</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>