[LLVMbugs] [Bug 23779] New: Segfault when globals reference constants when targeting OSX
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jun 7 11:02:17 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23779
Bug ID: 23779
Summary: Segfault when globals reference constants when
targeting OSX
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: alex at crichton.co
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The following IR will cause `llc` to segfault when executed with no extra
arguments:
target triple = "x86_64-apple-darwin"
@a = external global i8
@b = internal unnamed_addr constant i8* @a
@c = global i8** @b
Note that if the IR instead targets 64-bit linux the segfault does not happen.
the backtrace given is:
0 llc 0x00000000021f4c36
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 44
1 llc 0x00000000021f4f4b
2 llc 0x00000000021f3a4c
3 libpthread.so.0 0x00007f7ad0a59340
4 llc 0x0000000000dde9b0
5 llc 0x0000000001894131
6 llc 0x00000000018947b4
7 llc 0x000000000189486a
llvm::AsmPrinter::EmitGlobalConstant(llvm::Constant const*) + 96
8 llc 0x000000000188c853
llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*) + 3241
9 llc 0x000000000188f3cf
llvm::AsmPrinter::doFinalization(llvm::Module&) + 237
10 llc 0x00000000021372f1
llvm::FPPassManager::doFinalization(llvm::Module&) + 83
11 llc 0x00000000021376eb
12 llc 0x0000000002137c1d
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 249
13 llc 0x0000000002137e57
llvm::legacy::PassManager::run(llvm::Module&) + 39
14 llc 0x0000000000c3fea5
15 llc 0x0000000000c3ef50 main + 242
16 libc.so.6 0x00007f7acfa58ec5 __libc_start_main + 245
17 llc 0x0000000000c3bff9
Stack dump:
0. Program arguments: ./Debug+Asserts/bin/llc
/home/alex/bugpoint-reduced-simplified.ll
zsh: segmentation fault (core dumped) ./Debug+Asserts/bin/llc
~/bugpoint-reduced-simplified.ll
--
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/20150607/36139c2d/attachment.html>
More information about the llvm-bugs
mailing list