[llvm-bugs] [Bug 35370] New: Cannot use object files with OrcJIT on MacOS
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Nov 20 15:51:25 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35370
Bug ID: 35370
Summary: Cannot use object files with OrcJIT on MacOS
Product: libraries
Version: 5.0
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: OrcJIT
Assignee: unassignedbugs at nondot.org
Reporter: 1101.debian at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 19449
--> https://bugs.llvm.org/attachment.cgi?id=19449&action=edit
JIT runner source code
I made a simple JIT runner and now I am trying to feed it with an object file.
When I attempt to run 'main' then it crashes.
Even though it works just fine on Linux (tested on Ubuntu 16.04 32bit).
I attach my simple JIT runner as a main.cpp.
I built it using LLVM 5.0 official prebuilt binaries. I used the following
command:
clang++ `llvm-config --cxxflags` `llvm-config --libs` -lz -lncurses main.cpp -o
jitter
The I just built 'hello world' program:
clang++ -c main.cpp
And fed it to the jitter:
./jitter main.o
This is the trace I obtained from lldb:
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x0)
* frame #0: 0x0000000100bd81a9
jitter`llvm::orc::RTDyldObjectLinkingLayer::ConcreteLinkedObject<std::__1::shared_ptr<llvm::RuntimeDyld::MemoryManager>,
std::__1::shared_ptr<llvm::JITSymbolResolver>,
llvm::orc::RTDyldObjectLinkingLayer::addObject(std::__1::shared_ptr<llvm::object::OwningBinary<llvm::object::ObjectFile>
>,
std::__1::shared_ptr<llvm::JITSymbolResolver>)::'lambda'(std::__1::__list_iterator<std::__1::unique_ptr<llvm::orc::RTDyldObjectLinkingLayerBase::LinkedObject,
std::__1::default_delete<llvm::orc::RTDyldObjectLinkingLayerBase::LinkedObject>
>, void*>, llvm::RuntimeDyld&,
std::__1::shared_ptr<llvm::object::OwningBinary<llvm::object::ObjectFile> >
const&, std::__1::function<void
()>)>::buildInitialSymbolTable(std::__1::shared_ptr<llvm::object::OwningBinary<llvm::object::ObjectFile>
> const&) + 41
frame #1: 0x0000000100bd8102
jitter`llvm::orc::RTDyldObjectLinkingLayer::addObject(std::__1::shared_ptr<llvm::object::OwningBinary<llvm::object::ObjectFile>
>, std::__1::shared_ptr<llvm::JITSymbolResolver>) + 226
frame #2: 0x0000000100bd7b43 jitter`main + 963
frame #3: 0x00007fff8ad77235 libdyld.dylib`start + 1
--
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/20171120/0abfc9b2/attachment.html>
More information about the llvm-bugs
mailing list