[LLVMbugs] [Bug 22722] New: puts segfault under lli but not llc
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Feb 26 17:52:48 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22722
Bug ID: 22722
Summary: puts segfault under lli but not llc
Product: new-bugs
Version: 3.5
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: buck.2019 at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
my hello-world program works fine under llc, but segfaults under lli. is there
any reason for that?
http://paste.pound-python.org/show/fXhE19RSX0AqMW2W5hc8/
$ cat hello.ll
; ModuleID = ""
target triple = ""
target datalayout = ""
@".str4" = global [13 x i8] c"hello\2c\20world\21"
declare i32 @"puts"(i8* %".1")
define i32 @"main"()
{
.1:
%".2" = call i32 (i8*)* @"puts"(i8* getelementptr ([13 x i8]* @".str4", i32
0, i32 0))
ret i32 0
}
$ make
python hello.py > hello.ll
llc hello.ll
clang hello.s -o hello
./hello
hello, world!
$ cat hello.ll | lli
0 libLLVM-3.5.dylib 0x0000000104f2dd70
llvm::sys::PrintStackTrace(__sFILE*) + 40
1 libLLVM-3.5.dylib 0x0000000104f2e15b SignalHandler(int) + 248
2 libsystem_platform.dylib 0x00007fff81b345aa _sigtramp + 26
3 libsystem_malloc.dylib 0x00007fff8984727c malloc + 42
4 libsystem_c.dylib 0x00007fff80eeabd0 puts + 53
5 libsystem_c.dylib 0x0000000105e70027 puts + 2230867084
6 libLLVM-3.5.dylib 0x0000000104989b6f
llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*,
std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, char
const* const*) + 1609
7 lli 0x000000010439707d
8 libdyld.dylib 0x00007fff8bbe75fd start + 1
9 libdyld.dylib 0x0000000000000001 start + 1950452229
Stack dump:
0. Program arguments: lli
Segmentation fault: 11
$ llc --version
LLVM (http://llvm.org/):
LLVM version 3.5.1
Optimized build with assertions.
Built Feb 26 2015 (15:28:00).
Default target: x86_64-apple-darwin13.4.0
Host CPU: core-avx2
Registered Targets:
aarch64 - AArch64 (little endian)
aarch64_be - AArch64 (big endian)
arm - ARM
arm64 - AArch64 (little endian)
arm64_be - AArch64 (big endian)
armeb - ARM (big endian)
cpp - C++ backend
hexagon - Hexagon
mips - Mips
mips64 - Mips64 [experimental]
mips64el - Mips64el [experimental]
mipsel - Mipsel
msp430 - MSP430 [experimental]
nvptx - NVIDIA PTX 32-bit
nvptx64 - NVIDIA PTX 64-bit
ppc32 - PowerPC 32
ppc64 - PowerPC 64
ppc64le - PowerPC 64 LE
r600 - AMD GPUs HD2XXX-HD6XXX
sparc - Sparc
sparcv9 - Sparc V9
systemz - SystemZ
thumb - Thumb
thumbeb - Thumb (big endian)
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
xcore - XCore
$ lli --version
LLVM (http://llvm.org/):
LLVM version 3.5.1
Optimized build with assertions.
Built Feb 26 2015 (15:28:00).
Default target: x86_64-apple-darwin13.4.0
Host CPU: core-avx2
--
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/20150227/fdcf2df6/attachment.html>
More information about the llvm-bugs
mailing list