<html>
<head>
<base href="https://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 --- - Assertion failure with indirect symbols on OSX" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24163&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=obPHa30PEm7OkHiNTlBRTFLMxGdnW-tG_69TXFQKxFM&s=3nxA3A8lZtQj7hgzFGEOYx-DEKyAfiG9j1YtDUIEzp0&e=">24163</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion failure with indirect symbols on OSX
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>3.7
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alex@crichton.co
</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>The following IR causes llc to trip an assertion (when running with
-filetype=obj)
target triple = "x86_64-apple-darwin"
@r1 = external constant i64
@r2 = internal unnamed_addr constant i64* @r1
@r3 = constant i64** @r2
define internal void @foo(i64*** %slot) {
store i64** @r2, i64*** %slot
ret void
}
llc: /home/alex/code/llvm/include/llvm/Support/Casting.h:95: static bool
llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To =
llvm::GlobalValue; From = llvm::Constant]: Assertion `Val && "isa<> used on a
null pointer"' failed.
0 llc 0x00000000022db008
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 44
1 llc 0x00000000022db31d
2 llc 0x00000000022d9e1e
3 libpthread.so.0 0x00007f3f9f2ac340
4 libc.so.6 0x00007f3f9e2c0cc9 gsignal + 57
5 libc.so.6 0x00007f3f9e2c40d8 abort + 328
6 libc.so.6 0x00007f3f9e2b9b86
7 libc.so.6 0x00007f3f9e2b9c32
8 llc 0x0000000000f8d418
9 llc 0x0000000000f8c828
10 llc 0x0000000000f8ab47
11 llc 0x0000000000f87a74
12 llc 0x0000000000f8488c
13 llc 0x00000000019514c8
14 llc 0x0000000001951bac
15 llc 0x0000000001951c62
llvm::AsmPrinter::EmitGlobalConstant(llvm::Constant const*) + 96
16 llc 0x0000000001949db7
llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*) + 3241
17 llc 0x000000000194c945
llvm::AsmPrinter::doFinalization(llvm::Module&) + 237
18 llc 0x000000000221ce31
llvm::FPPassManager::doFinalization(llvm::Module&) + 83
19 llc 0x000000000221d22b
20 llc 0x000000000221d75d
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 249
21 llc 0x000000000221d997
llvm::legacy::PassManager::run(llvm::Module&) + 39
22 llc 0x0000000000c718d1
23 llc 0x0000000000c7075e main + 242
24 libc.so.6 0x00007f3f9e2abec5 __libc_start_main + 245
25 llc 0x0000000000c6d339
Stack dump:
0. Program arguments: ./Debug+Asserts/bin/llc ./<a class="bz_bug_link
bz_status_RESOLVED bz_closed" title="RESOLVED FIXED - Customize Bugzilla to have some LLVM flavah" href="show_bug.cgi?id=2">bug2</a>.ll
zsh: abort (core dumped) ./Debug+Asserts/bin/llc ./<a class="bz_bug_link
bz_status_RESOLVED bz_closed" title="RESOLVED FIXED - Customize Bugzilla to have some LLVM flavah" href="show_bug.cgi?id=2">bug2</a>.ll
This seems similar to <a class="bz_bug_link
bz_status_RESOLVED bz_closed" title="RESOLVED FIXED - Segfault when globals reference constants when targeting OSX" href="show_bug.cgi?id=23779">https://llvm.org/bugs/show_bug.cgi?id=23779</a>, but I'm not
sure if the fix is the exact same.</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>