Displaying 20 results from an estimated 300 matches similar to: "JIT and atexit crash"
2017 Nov 21
2
JIT and atexit crash
> It's not the job of the Orc engine.
I could argue about this, but I won’t :)
> Just don't use atexit.
The problem is that I run third-party programs. I cannot control them.
> On 20. Nov 2017, at 01:04, Joerg Sonnenberger via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> On Mon, Nov 20, 2017 at 12:22:49AM +0100, Alex Denisov via llvm-dev wrote:
>> JIT
2017 Nov 23
2
JIT and atexit crash
Maybe the easiest workaround would be overriding symbol resolution for
the function name and redirect it to your own version in static code
(and hope it has no bad side effect on your use case).
I think when running 3rd party code, the only way to definitely avoid
this kind of trouble is to never deallocate any code or data sections.
Doug Binks mentioned that too in his cppcast about Runtime
2017 Nov 23
1
JIT and atexit crash
Hi,
Not sure whether this matches your use case, but the Orc-based JIT used
in LLI appears to be using `llvm::orc::LocalCXXRuntimeOverrides`
(http://llvm.org/doxygen/classllvm_1_1orc_1_1LocalCXXRuntimeOverrides.html)
to override `__cxa_atexit`:
https://github.com/llvm-mirror/llvm/blob/release_50/tools/lli/OrcLazyJIT.h#L74
2017 May 07
2
[cfe-dev] JIT doens't resolve address - Resolve obj-Addresses?
Hi Bjoern,
CCing cfg-dev (since that's where the conversation started) and llvm-dev
(since it's relevant there).
Do you know if there is a way to obtain the fully resolved obj-code? I
> wanted to load the functions into a shared memory, but how? The only thing
> I receive is a function pointer, but I don't know how large the function
> 'behind' is. Even a call to
2017 Apr 09
2
Possible stack corruption during call to JITSymbol::getAddress()
Firstly, apologies if this is not the right place to be asking this
question--feel free to point me in the correct direction. I could be doing
something wrong here but stackoverflow didn't feel like the correct place
for this since there's so little there about LLVM ORC.
Basically, I have a reproduction case (below) where if I throw an exception
before I call JITSymbol::getAddress()
2017 Apr 17
2
Possible stack corruption during call to JITSymbol::getAddress()
Hi David,
This looks like bad eh-frame data due to a failure to fix up the frame
descriptor entries:
<debug: adding frame> EHFrameAddr: 0x7feae5827000, EHFrameLoadAddr:
0x00000000e5827000, EHFrameSize: 60
==64588==ERROR: AddressSanitizer: SEGV on unknown address 0x7feae5827020
(pc 0x7feae886d970 bp 0x000000000001 sp 0x7ffca10e75f8 T0)
Eyeballing the code in RuntimeDyldELF (vs
2017 Apr 20
2
Possible stack corruption during call to JITSymbol::getAddress()
Hi David,
Thanks very much for that. I'll continue to dig in as time permits, and
I'll update the bug report with my progress once it's filed.
Cheers,
Lang.
On Mon, Apr 17, 2017 at 6:42 PM, David Lurton <dlurton at gmail.com> wrote:
> Thanks Lang. I think I'll go the bug creation route. I have an email out
> to llvm-admin requesting an account on bugs.llvm.org.
2017 May 01
1
Possible stack corruption during call to JITSymbol::getAddress()
Hi David,
Sorry to hear. Has anyone followed up with you yet?
I've continued to dig in to this in my spare time and I've found the issue.
It's a use-after-free, rather than any sort of memory smashing. ORC is
currently failing to deregister the EH-frame section when the JIT is torn
down (but *is* deallocating the memory for it). Normally that's not
disastrous (though it does
2017 Aug 06
2
Compile issues with LLVM ORC JIT
I tree to compile the LLVM ORC JIT examples. But I'm stuck in some
problems I can't solve my own.
First at all I compile with C++14 enabled with latest stable LLVM and
clang, this means 4.0.1. I get the following error. Do I missed some
specific compile option?
Compilation looks like this here.
|CompilingcontribJIT.cpp
PWD:/home/ikuehl/projects-llvm/TurboLisp/domainEngineer
2015 Aug 13
4
Linking existing functions from JITed code
Hi
I’ve previously used the ExecutionEngine::addGlobalMapping to make existing
functions available to my JITed code.
I’m currently using ORC, as MCJIT does not appear to be maintained any
longer (the kaleidoscope examples have not worked for some time with
MCJIT).
I’m using just the basic ORC CompileLayer directly.
So, I’ve essentially copied the ExecutionEngine::addGlobalMapping related
2015 Aug 13
2
Linking existing functions from JITed code
Hi Andy,
I haven't tested this on Linux, but on MacOS the
RuntimeDyldMemorManager::getSymbolAddressInProcess method should find
symbol addresses in the host program, including symbols from static
archives linked into the program. However, one gotcha is that the symbol
has to be reachable from main, otherwise the linker may strip it from the
final executable.
Do you have a test-case that I
2015 Aug 20
2
Linking existing functions from JITed code
Hi Andy,
I think that makes sense. I'm currently rewriting the core Kaleidoscope
tutorials - I'll look at adding support for this.
- Lang.
On Fri, Aug 14, 2015 at 7:38 AM, Andy Somogyi <andy.somogyi at gmail.com>
wrote:
> After some fiddling with it, it does in fact look like it works as you
> describe Lang.
>
> The trick was you had to call
>
>
2015 Aug 20
2
Linking existing functions from JITed code
Lang,
I added the add/get global mapping to my kaleidoscope JIT, but I think perhaps these would make more sense if they were added to the object linking layer as they would be generally usable there.
On Aug 19, 2015, at 11:19 PM, Andy Somogyi wrote:
> Hey Lang,
>
> I've added this to my Kaleidoscope JIT, and it seems to work just fine, basically I copied the global mapping
2017 Sep 22
2
Question regarding GlobalMappingLayer in LLVM 5
Hi,
I'm attempting to port some code which uses the GlobalMappingLayer in the Orc JIT. This code worked fine in LLVM 4, but I'm getting a compile error with LLVM 5. I think the problem is that this layer hasn't been modified to account for some of the changes made in LLVM 5, but I wanted to make sure that I wasn't missing something.
I have code which looks like this:
2017 Sep 28
0
Question regarding GlobalMappingLayer in LLVM 5
Hi Brian,
Yes - I believe you're correct. I'm working on a fix and extra test
coverage now. In the meantime, I believe you should be able to fix the
signatures in your copy and everything should "just work".
Cheers,
Lang.
On Fri, Sep 22, 2017 at 2:04 PM, Brian Kahne via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi,
>
>
>
> I’m attempting to port
2018 Jun 28
3
Since MCJIT I can't get libm functions to work
I am upgrading our JIT application to use LLVM 6.0.0, and with this
transition I am making the move to use the new MCJIT facility.
A problem I am encountering is that the math functions from libm are not
resolved/found. I am using the lambda resolver from the KaleidoscopeJIT
class which first searches the present modules and, if that is
unsuccessful, continues the search in the whole process
2018 Jun 28
2
Since MCJIT I can't get libm functions to work
Hi Alex,
loading the symbols explicitly helped. With this the build process
doesn't need any additional linker flags. Very nice.
Thanks,
Frank
On 06/28/2018 04:38 PM, Alex Denisov wrote:
> Hi Frank,
>
> If I am not mistaken it doesn't look in the whole process space by default.
> Please, try loading all the symbols explicitly:
>
>
2015 May 30
2
[LLVMdev] MCJit interface question
Agreed, that sounds like the best plan. I'll look into moving LLILC to ORC.
Thanks
-Joseph
From: Russell Hadley
Sent: Friday, May 29, 2015 8:13 PM
To: Lang Hames; Joseph Tremoulet
Cc: llvmdev at cs.uiuc.edu
Subject: RE: [LLVMdev] MCJit interface question
Hey Joseph,
What Lang said made me wonder. Is it the right time for us (LLILC) to move to ORC? The long term plan was to go there but
2016 May 17
3
External function resolution: MCJIT vs ORC JIT
When using ORC JIT, I'm having trouble with external function resolution (that is, of a function defined in the app, with C linkage).
I add a declaration for the function to my IR, and when I use MCJIT, it finds it and all is well, But when I use ORC JIT (I *think* correctly, at least it closely matches what I see in the tutorial), I get an LLVM error, "Program used external function
2016 May 20
0
External function resolution: MCJIT vs ORC JIT
Hi Larry,
Thanks so much! This seems to do the trick. I would have spun my wheels for
> a long time before discovering all of this, wow.
No worries. :)
I'll try to keep this in mind and make sure I address it in future
Kaleidoscope tutorial chapters - these issues tripped me up the first time
I encountered them too.
Do I even want to know what additional chickens need to be sacrificed