<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 - After r363529, An asserting value handle still pointed to this value!"
href="https://bugs.llvm.org/show_bug.cgi?id=43269">43269</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>After r363529, An asserting value handle still pointed to this value!
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dimitry@andric.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>After <a href="https://reviews.llvm.org/rL363529">https://reviews.llvm.org/rL363529</a> ('Re-commit r357452 (take 3):
"SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without
used results (PR41259)"'), compiling certain kernel modules for FreeBSD crashes
clang with:
<span class="quote">> While deleting: i8* %n
> An asserting value handle still pointed to this value!
> UNREACHABLE executed at /home/dim/src/llvm/llvm-project/llvm/lib/IR/Value.cpp:893!</span >
Reduced test case:
// clang -cc1 -triple aarch64-- -S -O1 if_malo_pci-min.c
struct b {
int c;
int d;
int e;
int ecm;
};
struct f {
struct b g[1024];
} h(), j;
struct k {
struct f l;
void *m[1];
int n;
};
int o, p;
int q();
void r();
void *s();
int t() {
int i;
struct k *a = s();
if (o)
goto bad;
if (a->n)
q(0, p, 0, h, 0, &j, a->m);
else
q(0, p, 0, h, 0, &j, &a->m[i]);
if (q())
r();
if (a->n)
r(0, p, a->m[0]);
else
for (i = 0; i < 1; i++)
r(0, p, a->m[i]);
bad:
return 0;
}
Backtrace:
Starting program: /home/dim/obj/clang-363529/bin/clang -cc1 -triple aarch64--
-S -O1 if_malo_pci-min.c
While deleting: i8* %n
An asserting value handle still pointed to this value!
UNREACHABLE executed at
/home/dim/src/llvm/llvm-project/llvm/lib/IR/Value.cpp:893!
Program received signal SIGABRT, Aborted.
thr_kill () at thr_kill.S:3
3 thr_kill.S: No such file or directory.
(gdb) bt
#0 thr_kill () at thr_kill.S:3
#1 0x0000000803dbe934 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
#2 0x0000000803d31d99 in abort () at /usr/src/lib/libc/stdlib/abort.c:67
#3 0x0000000001d3678d in llvm::llvm_unreachable_internal(char const*, char
const*, unsigned int) ()
#4 0x000000000183992e in llvm::ValueHandleBase::ValueIsDeleted(llvm::Value*)
()
#5 0x0000000001839c6e in llvm::Value::~Value() ()
#6 0x0000000001839ad3 in llvm::Value::deleteValue() ()
#7 0x00000000017c2590 in llvm::Instruction::eraseFromParent() ()
#8 0x0000000001de70ed in
llvm::RecursivelyDeleteTriviallyDeadInstructions(llvm::SmallVectorImpl<llvm::Instruction*>&,
llvm::TargetLibraryInfo const*, llvm::MemorySSAUpdater*) ()
#9 0x0000000001de6b19 in
llvm::RecursivelyDeleteTriviallyDeadInstructions(llvm::Value*,
llvm::TargetLibraryInfo const*, llvm::MemorySSAUpdater*) ()
#10 0x000000000136aaa8 in (anonymous
namespace)::CodeGenPrepare::optimizeMemoryInst(llvm::Instruction*,
llvm::Value*, llvm::Type*, unsigned int) ()
#11 0x0000000001362167 in (anonymous
namespace)::CodeGenPrepare::optimizeInst(llvm::Instruction*, bool&) ()
#12 0x0000000001358c14 in (anonymous
namespace)::CodeGenPrepare::runOnFunction(llvm::Function&) ()
#13 0x00000000017f2e7a in llvm::FPPassManager::runOnFunction(llvm::Function&)
()
#14 0x00000000017f3213 in llvm::FPPassManager::runOnModule(llvm::Module&) ()
#15 0x00000000017f3722 in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
#16 0x0000000001f5dcd0 in clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::__1::unique_ptr<llvm::raw_pwrite_stream,
std::__1::default_delete<llvm::raw_pwrite_stream> >) ()
#17 0x00000000025fae02 in
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) ()
#18 0x0000000002d6a363 in clang::ParseAST(clang::Sema&, bool, bool) ()
#19 0x000000000255c06a in clang::FrontendAction::Execute() ()
#20 0x00000000024d6991 in
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ()
#21 0x00000000025f4fb5 in
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ()
#22 0x0000000000f066ec in cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) ()
#23 0x0000000000f040ab in main ()</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>