[llvm-bugs] [Bug 27533] New: replaceAllUsesWith asserts on initialized GS-relative global ptr
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 26 16:58:50 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27533
Bug ID: 27533
Summary: replaceAllUsesWith asserts on initialized GS-relative
global ptr
Product: new-bugs
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: aaronc at apple.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
This test program:
-------- x8 --------
unsigned int *x __attribute__((address_space(256))) = 0;
int main(int argc, char *argv[])
{
*x = 42;
}
-------- x8 --------
triggers this assertion on r267628:
Assertion failed: (New->getType() == getType() && "replaceAllUses of value with
new value of different type!"), function replaceAllUsesWith, file
/Users/aaronc/dev/llvm.mainline/lib/IR/Value.cpp, line 375.
0 clang-3.9 0x000000010944691e
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 46
1 clang-3.9 0x0000000109446e49
PrintStackTraceSignalHandler(void*) + 25
2 clang-3.9 0x0000000109443339 llvm::sys::RunSignalHandlers() +
425
3 clang-3.9 0x00000001094473d2 SignalHandler(int) + 354
4 libsystem_platform.dylib 0x00007fff9279e52a _sigtramp + 26
5 clang-3.9 0x000000010d439bdc guard variable for
shouldAddRequirement(clang::Module*, llvm::StringRef, bool&)::IOKitAVC + 126748
6 clang-3.9 0x0000000109446e6b raise + 27
7 clang-3.9 0x0000000109446f12 abort + 18
8 clang-3.9 0x0000000109446efe __assert_rtn + 126
9 clang-3.9 0x0000000108cc845b
llvm::Value::replaceAllUsesWith(llvm::Value*) + 299
10 clang-3.9 0x0000000108ef0cc4 (anonymous
namespace)::AddressSanitizerModule::InstrumentGlobals(llvm::IRBuilder<llvm::ConstantFolder,
llvm::IRBuilderDefaultInserter>&, llvm::Module&) + 3060
11 clang-3.9 0x0000000108eefcb1 (anonymous
namespace)::AddressSanitizerModule::runOnModule(llvm::Module&) + 561
12 clang-3.9 0x0000000108c0264f (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&) + 1967
13 clang-3.9 0x0000000108c01c26
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 342
14 clang-3.9 0x0000000108c032a1
llvm::legacy::PassManager::run(llvm::Module&) + 33
15 clang-3.9 0x0000000109736500 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
llvm::raw_pwrite_stream*) + 3840
16 clang-3.9 0x0000000109734ad6
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
llvm::raw_pwrite_stream*) + 150
17 clang-3.9 0x0000000109a22ba1
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 1473
18 clang-3.9 0x000000010aeeb5e4 clang::ParseAST(clang::Sema&,
bool, bool) + 1284
19 clang-3.9 0x0000000109f97e35
clang::ASTFrontendAction::ExecuteAction() + 485
20 clang-3.9 0x0000000109a21ced
clang::CodeGenAction::ExecuteAction() + 6125
21 clang-3.9 0x0000000109f96f00 clang::FrontendAction::Execute()
+ 112
22 clang-3.9 0x0000000109ee6d74
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1828
23 clang-3.9 0x000000010a02312d
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4765
24 clang-3.9 0x0000000107153a66 cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 4870
25 clang-3.9 0x0000000107144216
ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) + 470
26 clang-3.9 0x0000000107141744 main + 3524
27 libdyld.dylib 0x00007fff884fa5ad start + 1
28 libdyld.dylib 0x0000000000000033 start + 2008046215
Built with:
clang -Wall test.c -fsanitize=address
The assertion does not trip if I remove the initializer.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160426/ce0ea5d7/attachment-0001.html>
More information about the llvm-bugs
mailing list