similar to: [LLVMdev] RFA: Problem with Exceptions

Displaying 20 results from an estimated 900 matches similar to: "[LLVMdev] RFA: Problem with Exceptions"

2007 Aug 31
0
[LLVMdev] RFA: Problem with Exceptions
Hi Bill, > I'm compiling this trivial program on Darwin: > > int main(int argc, char **argv) { > try { > throw argc; > } catch(int i) { > return i; > } > > return 0; > } > > However, it segfaults when I run it. I've attached the .s files > generated by LLVM and GCC, but it looks as if LLVM isn't generating a >
2007 Aug 30
0
[LLVMdev] RFA: Problem with Exceptions
On Aug 30, 2007, at 3:31 PM, Bill Wendling wrote: > Hi all, > > I'm compiling this trivial program on Darwin: > > int main(int argc, char **argv) { > try { > throw argc; > } catch(int i) { > return i; > } > > return 0; > } > > However, it segfaults when I run it. I've attached the .s files > generated by LLVM and GCC, but it
2010 Jan 21
4
[LLVMdev] Exception handling question
Hi, I'm trying to get exception handling working in my compiler targetting LLVM. I've been working from the LLVM exception handling documentation (including http://llvm.org/docs/ExceptionHandling.html and http://wiki.llvm.org/HowTo:_Build_JIT_based_Exception_mechanism) and looking at g++-llvm's output. I've been trying to get a minimal test function to work, which simply invokes
2010 Jan 22
0
[LLVMdev] Exception handling question
Hi James, > I've been trying to get a minimal test function to work, which simply > invokes _Unwind_RaiseException with a single clean-up landing pad. > However. when I run it my personality function is not getting called - > _Unwind_RaiseException simply returns apparently doing nothing. Looking > at the x86-64 assembly output from llc, I can see this is happening >
2010 Jan 22
2
[LLVMdev] Exception handling question
2010/1/22 Duncan Sands <baldrick at free.fr> > Hi James, > > > I've been trying to get a minimal test function to work, which simply >> invokes _Unwind_RaiseException with a single clean-up landing pad. However. >> when I run it my personality function is not getting called - >> _Unwind_RaiseException simply returns apparently doing nothing. Looking at
2007 Aug 30
0
[LLVMdev] RFA: Problem with Exceptions
Hi Bill, is this a 64 bit machine? If so, did you make any adjustments based on http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-August/010489.html ? Thanks, Duncan.
2011 Jul 28
2
[LLVMdev] LLVMdev Digest, Vol 85, Issue 50
John, I'm still not sure what you're talking about, I have included the assembly output from two compilations, one with a user explicit catch-all, one with only an implicit cleanup, the DWARF Action Table and Types Table are absolutely identical, as are the indexes used to reference the Action Table from the region maps. -Peter Lawrence.
2007 Aug 30
0
[LLVMdev] RFA: Problem with Exceptions
Duncan, > Hi Bill, is this a 64 bit machine? If so, did you make > any adjustments based on > http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-August/010489.html ? This is 32 bit machine. 64 bit will definitely won't work due to bunch of stuff unimplemented: dwarf builtins, stack layout description, etc. -- With best regards, Anton Korobeynikov. Faculty of Mathematics &
2011 Aug 05
3
[LLVMdev] RFC: Exception Handling Rewrite
Bill, ooops, yes, I described the meaning of "throw(A)" backwards, but I still think my example shows why you cannot merge LandingpadInst while inlining because multiple filter-lists on a LandingpadInst don't make sense. Perhaps I'm reading your original spec wrong, perhaps I'm mis-reading Duncan's emails, but I read them to mean that your syntax supports
2007 Dec 08
2
[LLVMdev] Darwin vs exceptions
Hi Chris, > ... Claiming that a function has a > > catch-all handler when it does > > not causes the unwinder to go into a loop. this is the bit I don't understand. Why does it go into a loop? How can the unwinder possibly know that the original code did not have a catch-all, since we tell it which catches there are and we say: there is a catch-all! > > -
2007 Dec 08
0
[LLVMdev] Darwin vs exceptions
On Dec 8, 2007, at 12:51 AM, Duncan Sands wrote: > Hi Chris, > >> ... Claiming that a function has a >>> catch-all handler when it does >>> not causes the unwinder to go into a loop. > > this is the bit I don't understand. Why does it go > into a loop? How can the unwinder possibly know that > the original code did not have a catch-all, since we
2007 Dec 09
1
[LLVMdev] Darwin vs exceptions
Hi Dale, > > this is the bit I don't understand. Why does it go > > into a loop? How can the unwinder possibly know that > > the original code did not have a catch-all, since we > > tell it which catches there are and we say: there is > > a catch-all! > > The unwinder works by doing a stack crawl to find a handler. Since > we're telling it
2007 Dec 10
3
[LLVMdev] Darwin vs exceptions
On Dec 10, 2007, at 11:38 AM, Duncan Sands wrote: >>> ... If you force a "cleanup" by changing the selector call to: >>> %eh_select8.i = tail call i32 (i8*, i8*, ...)* >>> @llvm.eh.selector.i32( i8* %eh_ptr.i, i8* bitcast (i32 (...)* >>> @__gxx_personality_v0 to i8*), i32 0) >>> then it doesn't work either: the unwinder observes that
2007 Sep 03
0
[LLVMdev] RFA: Problem with Exceptions
Duncan, > I see a call to terminate in the llvm assembler. Where did that > come from? I compiled with llvm-gcc-4.0 and llvm-gcc-4.2 and > didn't see such a call. std::terminate() is called by __cxa_throw, if unwinding fails. I think the source of problem was my frame_to_args_offs patch. So, let's wait for retest :) -- With best regards, Anton Korobeynikov. Faculty of
2012 Apr 08
2
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
On Apr 4, 2012, at 9:32 PM, Paul J. Lucas wrote: > On Mar 23, 2012, at 4:46 PM, Bill Wendling wrote: [...] > This all seems to work just fine. I can throw a C++ exception either in a C++ object's constructor or in an ordinary member function and the stack unwinds correctly (the object's destructors are called) and the exception is propagated back up the C++ code that called the
2007 Dec 12
0
[LLVMdev] Darwin vs exceptions
Hi Dale, > No, I don't want to change the semantics of invoke, at least I don't > think so. > When inlining, I want the inlined throw to reach cleanup code as it > does. > But I want the Unwind_Resume call that ends the cleanup code to be > replaced with a control transfer to the handler (or cleanup) in the > calling > function, i.e. the inliner needs to know
2007 Dec 10
3
[LLVMdev] Darwin vs exceptions
On Dec 9, 2007, at 1:01 PM, Duncan Sands wrote: > Hi Dale, > >> #include <cstdio> >> class A { >> public: >> A() {} >> ~A() {} >> }; >> void f() { >> A a; >> throw 5.0; >> } >> main() { >> try { >> f(); >> } catch(...) { printf("caught\n"); } >> } > > this example
2007 Dec 10
0
[LLVMdev] Darwin vs exceptions
Hi Dale, > > ... Suppose we don't artificially add catch-alls to > > selectors. Then > > the above example compiles to: > > ... > I wasn't advocating this; agree it is wrong. it's maybe not as wrong as it seems since having an empty selector is equivalent to having a cleanup (IIRC) :) > > ... If you force a "cleanup" by changing the
2007 Dec 09
3
[LLVMdev] Darwin vs exceptions
(Mail system seems to have eaten this, sorry if it's a repeat) On Dec 8, 2007, at 12:48 AM, Duncan Sands wrote: > Hi Dale, > >> - Why was C++ claiming that every selector has a catch-all handler? > > this is easy: because the semantics of invoke require it. Yes, > really. > If unwinding reaches an invoke then control is required to jump to the > unwind basic
2012 Apr 08
0
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
On Apr 8, 2012, at 4:20 AM, Bill Wendling wrote: > On Apr 4, 2012, at 9:32 PM, Paul J. Lucas wrote: > >> This all seems to work just fine. I can throw a C++ exception either in a C++ object's constructor or in an ordinary member function and the stack unwinds correctly (the object's destructors are called) and the exception is propagated back up the C++ code that called the