<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 - clang crashes (SIGSEGV) in clang::TypeLoc::findNullabilityLoc()"
href="https://bugs.llvm.org/show_bug.cgi?id=45304">45304</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang crashes (SIGSEGV) in clang::TypeLoc::findNullabilityLoc()
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>enhancement
</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>hanauska@equinux.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23279" name="attach_23279" title="Crash Info">attachment 23279</a> <a href="attachment.cgi?id=23279&action=edit" title="Crash Info">[details]</a></span>
Crash Info
I know that Apple is shipping customized versions of clang in Xcode, yet this
issue doesn't seem Apple clang specific as I doubt Apple has touched the
related files in their release.
I can reproducible crash clang with EXC_BAD_ACCESS (SIGSEGV) when compiling an
Objective-C file. It crashes at
0x00000001098130c1 clang::TypeLoc::findNullabilityLoc() const + 49
(clang load address was 0x10619b000)
See attached file for more details and full call stack.
clang --version identifies it as:
Apple clang version 11.0.3 (clang-1103.0.32.29)
I reported that issue to Apple already when they released the first Xcode 11.4
beta. I updated the bug withe the two betas to follow. There was never any
reaction and now Apple has released Xcode 11.4 final and it still contains a
clang with that problem.
I fail to create a minimal test case and I must not upload the original source
files in public. Also I think there might be issues with the code, yet even
with issues in code, a compiler shouldn't crash, should it?
Apparently the crash won't happen if I remove all
"__attribute__((ns_returns_retained))" from the source files, despite the fact
that these are set correctly (C functions that indeed return objects that
require releasing).
Other information that may be relevant:
- All source files are wrapped in between
#pragma clang assume_nonnull begin
and
#pragma clang assume_nonnull end
- Automatic Reference Counting is active
- The retained object by the C functions mentioned above is always of the type:
id<SomeProtocol> and can never be NULL.
I shared the source code with Apple but as there it isn't public. Let me know
what else you need; as long as it's not the source code itself, I can probably
provide it.</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>