Displaying 20 results from an estimated 9550 matches for "throw".
2007 Oct 26
0
8 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c test/trace
...| 2
libswfdec/swfdec_as_context.c | 54 ++++++++++++++++++-
libswfdec/swfdec_as_context.h | 9 ++-
libswfdec/swfdec_as_interpret.c | 79 ++++++++++++++--------------
test/trace/Makefile.am | 7 ++
test/trace/try-throw-in-finally-6.swf |binary
test/trace/try-throw-in-finally-6.swf.trace | 2
test/trace/try-throw-in-finally-7.swf |binary
test/trace/try-throw-in-finally-7.swf.trace | 2
test/trace/try-throw-in-finally-8.swf |binary
test/trace/try-throw-in-finally-8.swf.trace | 2
te...
2007 Sep 20
10
Element.addMethods functions swallowing exceptions (IE6 + 7)
IE6 and IE7 are not correctly handling the ''throw'' command for
functions attached to Element via Element.addMethods. Firefox and
Safari are fine.
See the example below.
For IE6: functions called with no attributes (ie: funcName())
correctly handle thrown errors. Funcions called with attributes (ie:
funcName("foo")) will respon...
2010 Nov 28
0
[LLVMdev] RFC: Exception Handling Proposal II
...hat effectively there's an edge from the beginning of the block; the
> second is a slight twist, that the edge leaves from the end of the phis. I
> think the latter will greatly simplify every transformation which ever inserts
> a phi, and in particular mem2reg. Since phis can't throw, it should be
> equivalent anyway.
that makes sense to me, but needs to be thought about carefully.
>> In Ada you can throw and exception inside a destructor and it does not lead
>> to program termination.
>
> Interesting. I assume that the personality still sees these as ju...
2016 Jul 15
3
RFC: Strong GC References in LLVM
...mplied that somehow then I (or the example) was wrong. :)
>
:)
>
> We can't speculate these instructions (without special knowledge of
> the GC and the Java type system), and that's it.
Okey.
>
>
> > FWIW: This raises one of the same issues we have now with may-throw,
> > which is that, if all you have is a flag on the instruction, now you
> > have to look at every instruction in every block to know whether a *CFG*
> > transform is correct.
> >
> > That means any pass that wants to just touch the CFG can't do so without
> &g...
2007 Nov 06
1
[LLVMdev] Two labels around one instruction in Codegen
Duncan Sands wrote:
> Hi Nicolas,
>
>
>> In order to have exceptions for non-call instructions (such as sdiv,
>> load or stores), I'm modifying codegen so that it generates a BeginLabel
>> and an EndLabel between the "may throwing" instruction. This is what the
>> codegen of an InvokeInst does.
>>
>
> the rule is that all instructions between eh begin labelN and eh end labelN
> must unwind to the same landing pad. This is why invokes are bracketed by
> such labels. There are also two ot...
2009 Aug 16
2
[LLVMdev] Throwing function being marked nounwind under optimzation?
...abel %Unwind unwind label %lpad121
Something thinks that this invoke will always take the unwind path,
which isn't the case, and marks the Unwind block as unreachable. As a
consequence of that, the call to _Unwind_SjLj_Resume() is optimized
away, and thus the function is considered to not throw in PruneEH.cpp.
Very strange stuff.
Thoughts on how to proceed in figuring out the root cause of what's
going wrong?
bool ShouldThrow;
int throws()
try
{
if (ShouldThrow) throw 7; return 123;
} catch (...) {
printf("'throws' threw an exception: rethrowing!\n")...
2014 May 02
3
[LLVMdev] Question about implementing exceptions, especially to the VMKit team
...on Philip's point, depending on the state Pyston's
runtime already is in, you may have the choice of using a hybrid of a
"pending exception" word in your runtime thread structure, and an
implicit alternate ("exceptional") return address for calls into
functions that may throw. This lets you elide the check on the
pending exception word after calls by turning them into invokes that
unwind into a landingpad containing a generic exception handler. This
generic exception handler then checks the type of the pending
exception word and handles the exception (which may involv...
2010 Nov 28
5
[LLVMdev] RFC: Exception Handling Proposal II
...'ve
said, that effectively there's an edge from the beginning of the block; the
second is a slight twist, that the edge leaves from the end of the phis. I
think the latter will greatly simplify every transformation which ever inserts
a phi, and in particular mem2reg. Since phis can't throw, it should be
equivalent anyway.
> In Ada you can throw and exception inside a destructor and it does not lead
> to program termination.
Interesting. I assume that the personality still sees these as just cleanups,
so this must be implemented by running the destructor in a handler which
ab...
2007 Nov 06
0
[LLVMdev] Two labels around one instruction in Codegen
Hi Nicolas,
> In order to have exceptions for non-call instructions (such as sdiv,
> load or stores), I'm modifying codegen so that it generates a BeginLabel
> and an EndLabel between the "may throwing" instruction. This is what the
> codegen of an InvokeInst does.
the rule is that all instructions between eh begin labelN and eh end labelN
must unwind to the same landing pad. This is why invokes are bracketed by
such labels. There are also two other cases to consider: (1) potentiall...
2017 Jan 05
3
RFC: Allow readnone and readonly functions to throw exceptions
...ally to infer readnone/readonly.
Maybe we're not on the same page. When I say exception handler, I mean
any code the unwinding in-turn calls - i.e. anything in a catch block.
>
> In practice, when could we infer readnone without inferring nounwind?
> The only thing in LLVM that can throw is a call or intrinsic call to
> EH machinery, and that instruction will need to be attributed with
> knowledge of the exception handler. If the exception handler really
> doesn't write memory that LLVM can read, then we can mark it readonly,
> and our normal local inference wil...
2010 Jul 12
3
[LLVMdev] clang/g++ frontend: can __cxa_end_catch throw?
On 07/12/2010 00:23, Duncan Sands wrote:
> IIRC, __cxa_end_catch may throw an exception because it runs the destructor
> for the exception object, which can execute arbitrary user code and thus may
> throw an exception. This is why it is sometimes correct to use invoke for it.
> However in the case of your example it seems that llvm-gcc didn't optimize the
&...
2007 Oct 26
0
3 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c
...c/swfdec_as_context.c
+++ b/libswfdec/swfdec_as_context.c
@@ -809,6 +809,8 @@ start:
check_block = TRUE;
while (context->state < SWFDEC_AS_CONTEXT_ABORTED) {
+ // in case of an exception, skip blocks until exception is cleared or we
+ // run out of blocks
while (context->throwing && frame->blocks->len > 0) {
frame->pc = frame->block_end;
swfdec_as_frame_check_block (frame);
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index 3ab6fc0..cf41ff0 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/...
2009 Aug 16
0
[LLVMdev] Throwing function being marked nounwind under optimzation?
...nwind label %lpad121
> Something thinks that this invoke will always take the unwind path,
> which isn't the case, and marks the Unwind block as unreachable. As a
> consequence of that, the call to _Unwind_SjLj_Resume() is optimized
> away, and thus the function is considered to not throw in PruneEH.cpp.
> Very strange stuff.
>
> Thoughts on how to proceed in figuring out the root cause of what's
> going wrong?
>
>
> bool ShouldThrow;
>
> int throws()
> try
> {
> if (ShouldThrow) throw 7; return 123;
> } catch (...) {
> printf(&quo...
2010 Nov 28
1
[LLVMdev] RFC: Exception Handling Proposal II
On Nov 28, 2010, at 9:50 AM, Duncan Sands wrote:
>>> In Ada you can throw and exception inside a destructor and it does not lead
>>> to program termination.
>>
>> Interesting. I assume that the personality still sees these as just cleanups,
>> so this must be implemented by running the destructor in a handler which
>> aborts both unwind...
2018 May 16
1
Detect exception throwing in basic blocks
Hello,
For code:
try {
throw 42;
} catch(int e){}
Are there any helpers in LLVM API to give me info that in "try block" there
is a throw which will be executed? I am interested in info "yes, this block
throws".
Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <h...
2011 Aug 04
2
[LLVMdev] RFC: Exception Handling Rewrite
...lieve we can only get multiple filter lists in a landing-pad if
we attempt
to merge exception-regions, and since filters are only an outer-function
concept (not an inner try-statement concept) this can only come about
from function inlining.
so say we're considering inlining "void foo() throw(A) { ... }" into
"void bar() throw (B) {... foo(); ... ; frob(); ...}"
if you attempt to merge the landing pad for these functions (perhaps
assuming it is going to be simple because there are no cleanups in
either
function that would complicate things) then...
there has to be a...
2014 Feb 17
3
[LLVMdev] [cfe-dev] Unwind behaviour in Clang/LLVM
Hi all,
I feel that there are two problems with the existing infrastructure:
* The nounwind attribute is ambiguous for (1) not throwing exceptions and
(2) not performing stack unwinding. I feel that it will be better to
separate this in two different attributes
* There is some problem when the function has both uwtable and nounwind.
Although, I think it fine to keep the current definition of nounwind,
however, the uwtable attri...
2020 Aug 14
2
Exceptions and performance
...39;s just that I truly didn't understand since I'm not expert in llvm or optimizer or exception handling at all.
>
>> I believe one of the main reasons your understanding there might be
>> incorrect: Not every function returns an error code. But essentially every function can throw
>
> I think if a function could throw, then it *should* return an error code in the no-except approach, otherwise there would be no way to convey the error to caller.
I don't know of any codebase that uses "nothrow" ubiquitously enough
to represent this situation. In general in...
2014 Feb 15
2
[LLVMdev] [cfe-dev] Unwind behaviour in Clang/LLVM
I'd love to hear more details. Are you saying that this infinite loop
is a limitation of EHABI table format, and not something that can be
fixed in the compiler?
Meanwhile, please notice that gcc behavior matches current clang
behavior that I described above. We would not want to create an
incompatibility.
On Fri, Feb 14, 2014 at 8:42 PM, Logan Chien <tzuhsiang.chien at gmail.com>
2017 Mar 31
4
Dereferenceable load semantics & LICM
Hi Piotr,
On March 31, 2017 at 1:07:12 PM, Piotr Padlewski
(piotr.padlewski at gmail.com) wrote:
> [snip]
> Do I understand it correctly, that it is legal to do the hoist because all
> of the instructions above %vtable does not throw?
Yes, I think you're right. HeaderMayThrow is a conservative
approximation, and the conservativeness is biting us here.
> Are there any plans to fix it in the future? The fix doesn't seem hard to
Not to my knowledge.
> write and I can do it, but I am not sure if it won't be t...