Displaying 20 results from an estimated 5000 matches similar to: "[LLVMdev] LLVM: to catch 'unwind' instruction from calling C++ code"
2011 Nov 07
0
[LLVMdev] LLVM: to catch 'unwind' instruction from calling C++ code
oops... so how can unwind stack up to invoke call? Is there an alternative
to establish a custom exception handling?
2011/11/7 Duncan Sands <baldrick at free.fr>
>
>> Hi Semion, the unwind instruction has been removed from LLVM. Also, the
>> JIT
>> and code generators never supported it: it never unwound the stack, it
>> just
>> resulted in a nasty crash.
2008 Sep 29
1
[LLVMdev] Unwinds Gone Wild
Duncan Sands wrote:
>
> since libgcc is available everywhere llvm is, it's as multi-platform
> as llvm! If we didn't use libgcc then we'd have to introduce an llvm
> runtime library. Since it would just duplicate the functionality of
> libgcc, it would introduce an additional maintenance burden without
> bringing any real advantage AFAICS.
>
So if there's
2011 Jul 21
2
[LLVMdev] Catching exceptions passed through a JIT ExecutionEngine
Yes, I did -- it made no difference. Should it?
Note that I have since discovered that this is not a problem on Windows -- the exception drops through as expected.
pz
On 2011-07-21, at 5:45 PM, Garrison Venn wrote:
> Sorry Peter, just saw this.
>
> If you are still having the problem:
>
> Did you set: llvm::JITExceptionHandling = true; ?
>
> Garrison
>
> On Jul
2011 May 30
2
[LLVMdev] Crash in libunwind
Hello,
We have been investigating a crash in our application that may be related to how stack frames are generated by the JIT. We observe it with LLVM 2.9, but not with LLVM 2.8, everything else being the same. The crash occurs when dynamically generated code calls code that tries to unwind the stack.
Here is what the stack trace looks like on MacOSX 10.6 :
0 libSystem.B.dylib
2011 Jul 21
0
[LLVMdev] Catching exceptions passed through a JIT ExecutionEngine
Ok, see llvm/examples/ExceptionDemo/ExceptionDemo.cpp
For OS X and Linux, build llvm with the environmental variable BUILD_EXAMPLES set to 1(csh: setenv BUILD_EXAMPLES 1). If llvm is already built, it will only build the examples from clang and llvm, ExceptionDemo being one of those.
If I understand your case, running ExceptionDemo with an arg of -1 emulates your scenario. Note that the
2011 Sep 27
3
[LLVMdev] How to code catch-all in the new exception handling scheme?
On Sep 27, 2011, at 4:58 AM, Duncan Sands wrote:
> Hi Bill,
>
>>>> I'm looking at the docs, and while it refers to a "catch-all" clause,
>>>
>>> hopefully Bill will get rid of the first reference to "catch-all" since
>>> that section is inaccurate.
>>>
>> I *think* this is now correct. Please check. :)
>
2011 May 30
0
[LLVMdev] Crash in libunwind
This may be bogus, but do you have:
llvm::JITExceptionHandling = true;
for the code that generates the dynamic code?
It has been a while, but I don't recall what will happen when dynamic code, generated
with jit exception handling turned off, invokes libraries which in turn try to unwind the stack
via the libunwind api. However given that you say the code works with 2.8, my concern
2011 Aug 26
2
[LLVMdev] Dynamically allocate and free variables in stack
Hi, guys.
I have a beginner's question. The virtual machine I develop have
instructions to dynamically allocate variable in stack and to free it
(consistency of such instructions is checked before the actual jitting). To
allocate memory in stack we have alloca IR instruction, but I didn't find
any instruction to free it (such variables will be freed only when an
enclosing function will
2011 Sep 28
0
[LLVMdev] How to code catch-all in the new exception handling scheme?
Hi Bill,
>> The unwinder delegates the decision of whether to stop in a call frame to
>> that call frame's language-specific personality function. Not all personality
>> functions guarantee that they will stop to perform cleanups.
I was talking about who decides what to do if there are only cleanups all the
way up the stack (in C++ the program is terminated without
2011 Jul 12
5
[LLVMdev] Catching exceptions passed through a JIT ExecutionEngine
Hi All,
I'm trying to catch an exception that is "passed through" an LLVM ExecutionEngine but I am unable to do so. Specifically, in C++ code, inside a try/catch block, I call a JITted function, which in turn calls back into my code. Everything works fine unless an exception is thrown; I would except the outermost try/catch(...) block to catch the exception thrown in my innermost
2011 Jul 27
5
[LLVMdev] LLVMdev Digest, Vol 85, Issue 50
>
> What? Yet another EH proposal?! This one is different from the
> others in that
> I'm planning to start implementing this shortly. But I want your
> feedback! I've
> all ready gotten a lot of feedback from Chris, John, Jim, Eric, and
> many others.
> Now is your turn!
>
> Please read this proposal and send me your comments, suggestions,
> and
2011 Jul 21
0
[LLVMdev] Catching exceptions passed through a JIT ExecutionEngine
Sorry Peter, just saw this.
If you are still having the problem:
Did you set: llvm::JITExceptionHandling = true; ?
Garrison
On Jul 12, 2011, at 19:25, Peter Zion wrote:
> Hi All,
>
> I'm trying to catch an exception that is "passed through" an LLVM ExecutionEngine but I am unable to do so. Specifically, in C++ code, inside a try/catch block, I call a JITted function,
2014 Jan 17
2
[LLVMdev] Unable to catch Win64 exceptions that occur in the mcjit(ted) code
Hi all,
In my MSVC-compiled project I am using MCJIT to run some generated code. I
faced that in case of Win64 ('x86_64-pc-win32-elf') __try/__except block
doesn't work - the stack can not be unwound.
I have found that the only way to fix it is implementing my own
*registerEHFrames* function of the Memory Manager (but I'm not sure this
helps).
Maybe someone had a success solving
2009 Jul 20
2
[LLVMdev] x86 unwind support[MESSAGE NOT SCANNED]
Hi Kenneth,
> Is there anything in the current codebase that maps an "unwind"
> instruction to a DWARF unnwinder? Seeing as how (I think) the DWARF
> info is already compiled in, this would be a useful thing.
in llvm from svn an "unwind" instruction is mapped to a call to
_Unwind_Resume. This is no good for throwing a new dwarf exception,
but it does mean that you
2011 Sep 03
1
[LLVMdev] LLVM: Cannot instantiate JIT execution engine
Isn't there someone to help me with this issue? I'm very upset about this
stupid problem which wasted the whole day. BTW, I can create JIT from
main.cpp, but not in the required source file (runtime.cpp), so this is not
about linking. Very weird.
2011/9/2 Semion Prihodko <semion.ababo at gmail.com>
> I cannot call the constructor explicitly, because ForceJITLinking is a name
2009 Jul 18
0
[LLVMdev] x86 unwind support
Hi Kenneth, this way of implementing unwind won't interact properly with
dwarf exception handling. That's rather bad.
Ciao,
Duncan.
2011 Sep 02
3
[LLVMdev] LLVM: Cannot instantiate JIT execution engine
Hi, guys.
Have a strange problem with LLVM in my project (
https://github.com/ababo/AntOS). Cannot instantiate JIT execution engine
(NULL returns; message: Interpreter has not been linked in.). As you can see
from the code I call InitializeNativeTarget. Also I tried to directly
include the "llvm/ExecutionEngine/JIT.h" header, but with no success. I link
with `llvm-config --ldflags
2011 Jul 27
0
[LLVMdev] LLVMdev Digest, Vol 85, Issue 50
On Jul 27, 2011, at 10:27 AM, Peter Lawrence wrote:
> 3.b) I have been thinking about other possible control-flow-graph invariants of the
> landingpad blocks and the catch blocks that they lead to, but so far have not come up
> with very muchl, I wonder if anyone else is thinking about this...?...
>
> for example cleanups come before __cxa_begin_catch, but it isn't clear what
2009 Jul 20
0
[LLVMdev] x86 unwind support[MESSAGE NOT SCANNED]
Sweet! That is exactly what I've been looking for. I guess it's
going in the 2.6 release then?
And __cxa_throw will still throw a DWARF exception with the landing
pads and the exception object selection and all that jazz?
On Mon, Jul 20, 2009 at 12:12 PM, Duncan Sands<baldrick at free.fr> wrote:
> Hi Kenneth,
>
>> Is there anything in the current codebase that maps an
2011 Sep 24
2
[LLVMdev] How to code catch-all in the new exception handling scheme?
I'm looking at the docs, and while it refers to a "catch-all" clause, it
doesn't describe how to construct one. In the old scheme, a selector value
of 0 was used. What's the corresponding technique for the new scheme? Do I
need to update my personality function to handle catch-alls (it wasn't
needed in the previous scheme)?
--
-- Talin
-------------- next part