Displaying 20 results from an estimated 3000 matches similar to: "runStaticConstructorsDestructors() causes crash on exit"
2018 Jun 19
2
runStaticConstructorsDestructors() causes crash on exit
On Alex's advice I am switching from MCJIT to the Orc API to compile and
execute functions. Starting from the new clang-interpreter example in the
source code (top of the tree!), I am able to execute my functions all
right... as long as there are no constructors and destructors to call.
My question: is there a simple way, with the Orc API, to run a module's
constructors and destructors? I
2018 Jun 21
2
runStaticConstructorsDestructors() causes crash on exit
When OrcMCJITReplacement is given a new module, it asks for the module's
constructors, gives them names like $static_ctor.0, $static_ctor.1, etc.,
and saves the mangled names in a map. Later, to execute them, it uses
runViaLayer(), which looks for those symbol names in the given JIT layer.
Could one not simply execute the constructors straight away, rather than
naming them and looking them up
2018 Jun 25
2
runStaticConstructorsDestructors() causes crash on exit
Many thanks for the sample code, Alex. In the end I did it the same way
OrcMCJITReplacement does it. Constructors and destructors are called and,
thanks to LocalCXXRuntimeOverrides, the program does not crash on exit! But
it does seem like there should be a simpler way; the learning curve is
steep...
Geoff
On Thu, 21 Jun 2018 at 12:28, Alex Denisov <1101.debian at gmail.com> wrote:
>
2019 Mar 15
2
Static constructors with ORC JIT?
Thank you Alex,
I went and implemented a solution along those lines. It works well.
It may be worth mentioning static constructors in the Kaleidoscope tutorial.
Cheers,
Daniele
________________________________________
From: Alex Denisov [1101.debian at gmail.com]
Sent: 15 March 2019 08:07
To: Daniele Vettorel
Cc: llvm-dev at lists.llvm.org
Subject: Re: [llvm-dev] Static constructors with ORC
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 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 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
2019 Jan 05
2
Undefined symbols with inline functions using the ORC JIT on Linux
Hi Stefan,
Thanks for your reply. I tried running my simple example on Linux using lli
and it does work fine. So I think the best long-term solution is to migrate
my code to the new lazy orc jit. Unfortunately, even the simplest example
does not work on Windows:
int main() { return 0; }
This is the output:
JITDylib "<main>" (ES: 0x000001b6e4ad3670):
Search order: [
2011 Sep 09
3
[LLVMdev] runStaticConstructorsDestructors not calling static destructors
Hi there,
I'm having trouble getting ExecutionEngine->runStaticConstructorsDestructors(module, true) to actually trigger static destructors in my code. The static constructors however do get called.
I don't know if this is an LLVM or Clang issue, from looking at the IR (see below) it looks like the destructor is being tied to cxa_atexit, and I wonder if that is not called by
2011 Sep 09
0
[LLVMdev] runStaticConstructorsDestructors not calling static destructors
On Fri, Sep 9, 2011 at 1:36 PM, Graham Wakefield <wakefield at mat.ucsb.edu> wrote:
> Hi there,
>
> I'm having trouble getting ExecutionEngine->runStaticConstructorsDestructors(module, true) to actually trigger static destructors in my code. The static constructors however do get called.
>
> I don't know if this is an LLVM or Clang issue, from looking at the IR (see
2019 Mar 14
2
Static constructors with ORC JIT?
Hi all,
Is there way to tell the ORC JIT infrastructure to run the static constructors in a module that has just been compiled? I see that the ExecutionEngine class has a runStaticConstructorsDestructors function, is that relevant with ORC and if so, how should it be accessed? Thanks, Daniele
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2019 Jan 04
2
Undefined symbols with inline functions using the ORC JIT on Linux
Hi,
I am developing an application that uses the ORC api to JIT compile C++
code using Clang. So far I have done most of the work on Windows, where it
now mostly works as expected. However, when I tried to run my application
on Linux I ran into some problems.
The problem I ran into is that symbols for jitted inline functions cannot
be resolved. Both LLVM and Clang are checked out with latest
2020 Aug 23
3
Apropos "shouting": PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT
Who's "shouting" here? Even in complete lines, 9 consecutive words!
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: C:\Windows\Temp\crash-74a40f.c
clang: note: diagnostic msg: C:\Windows\Temp\crash-74a40f.sh
clang: note: diagnostic msg:
********************
--- crash-74a40f.c ---
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 19
2
JIT and atexit crash
Hi everyone, hi Lang,
I have a question about Orc JIT (and I think LLVM JIT in general).
I am jitting some C++ code that calls atexit and registers a function at some address 0xdeadbeef. Everything is fine, but when the host program (the one that JITs C++ code) shuts down, then I see a crash:
error: memory read failed for 0xdeadbeef
With the following backtrace:
* frame #0:
2020 Aug 23
2
Apropos "shouting": PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT
"David Blaikie" <dblaikie at gmail.com> wrote:
> Context is everything.
I'm willing to accept your humble apologies.
> Spotting the relevant details in long build output
> can be tricky & some emphasis (caps, the *** borders, etc) can be useful.
So you dare to "shout" at your users/customers, but mock when someone (me)
uses the same sort of emphasis,
2017 Jul 13
2
How to add custom instrumentation?
Hi everyone,
I run some functions using ORC JIT, now I need to add custom instrumentation.
I want to add two callbacks to each function: ‘enterFunction' at the beginning and ‘leaveFunction' at the end.
Intuition says that I could ‘just' insert CallInst's to the first and the last basic blocks in the function.
Am I correct? Are there any other/better way to do this? Is there
2020 Aug 23
2
Apropos "shouting": PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT
Hi Stefan,
You can find the contribution guidelines here :
https://llvm.org/docs/Contributing.html
LLVM also have code of conduct : https://llvm.org/docs/CodeOfConduct.html
On Sun, 23 Aug 2020 at 23:28, David Blaikie via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
>
>
> On Sun, Aug 23, 2020 at 10:54 AM Stefan Kanthak <stefan.kanthak at nexgo.de>
> wrote:
>
>>
2013 Jan 26
1
[LLVMdev] MCJIT/interpreter and iostream
As of LLVM 3.2, is it possible to use iostream with the MCJIT or interpreter execution engines? I'm getting some errors...
Each of these commands correctly prints "hello":
echo -e '#include <stdio.h>\nint main(){ printf("hello"); }' | clang -cc1 -emit-llvm-bc -x c++ | lli -use-mcjit
echo -e '#include <iostream>\nint main(){ std::cout <<
2001 May 11
1
Problems with OpenSSH2.9p1 on Linux/Sparc
Let me start this with the disclaimer that I am a Linux lover that only
pretends to
have any clue about coding.
I grabbed the latest version of OpenSSH (v2.9p1) and went to install it
on my Sparc
(RH 6.2, v2.4.2). Unlike OpenSSH 2.5.2p2, however, when I tried to
compile it
I got the following error:
... <compiling away> ...
gcc -g -O2 -Wall -I. -I. -I/usr/local/ssl/include