Re: [perl #60166] [BUG] Exception handling in parrot doesn't unwind stack.

2008-10-29 Thread Patrick R. Michaud
On Wed, Oct 29, 2008 at 10:06:15PM +0100, NotFound wrote: > > do_loop: > > say i > > push_eh do_inc > > $P0 = find_method i, "succ" > > i.$P0() > > do_inc: > > pop_eh > > inc i > > goto do_loop > > I've noticed an anomaly: if you

Re: [perl #60166] [BUG] Exception handling in parrot doesn't unwind stack.

2008-10-29 Thread NotFound
>> I've noticed an anomaly: if you add .get_results($P0) after pop_eh >> nothing bag happens, but if you put it before, it starts leaking a lot >> of memory. > > Is that after r32226? Before it was leaking both ways, I think. -- Salu2

Re: [perl #60166] [BUG] Exception handling in parrot doesn't unwind stack.

2008-10-29 Thread chromatic
On Wednesday 29 October 2008 14:06:15 NotFound wrote: > > With the following example (and the other patches to > > Parrot_ex_throw_from_op_args added by NotFound++), I'm able > > to run the following version and get to 250,000 without any > > difficulty. > > > >$ cat x.pir > >.sub 'main' >

Re: [perl #60166] [BUG] Exception handling in parrot doesn't unwind stack.

2008-10-29 Thread NotFound
> With the following example (and the other patches to > Parrot_ex_throw_from_op_args added by NotFound++), I'm able > to run the following version and get to 250,000 without any > difficulty. > >$ cat x.pir >.sub 'main' > .local pmc i > i = new 'Integer' > do_loop: >

Re: [perl #60166] [BUG] Exception handling in parrot doesn't unwind stack.

2008-10-28 Thread Patrick R. Michaud
On Tue, Oct 28, 2008 at 10:15:32PM -0500, Patrick R. Michaud wrote: > ... As discussed in #parrotsketch > earlier today and summarized at [1], the correct form of the > above loop would have the "pop_eh" line after the do_inc label, > so that every exception handler created in the loop is removed >

Re: [perl #60166] [BUG] Exception handling in parrot doesn't unwind stack.

2008-10-28 Thread Patrick R. Michaud
On Sun, Oct 26, 2008 at 10:05:21PM -0700, Vasily Chekalkin wrote: > Exception handling in parrot doesn't unwind used stack frames. > > Simple example: > > .sub 'main' > .local pmc i > i = new 'Integer' >do_loop: > say i > push_eh do_inc > $P0 = find_method i, "succ" >

Re: [perl #60166] [BUG] Exception handling in parrot doesn't unwind stack.

2008-10-28 Thread NotFound
> I'm working on a patch that defines the helper function > Parrot_ex_throw_from_op_args to simplfy the throwing in cases like this. After discussion in #parrotsketch, added this function in r3 -- Salu2

[perl #60166] [BUG] Exception handling in parrot doesn't unwind stack.

2008-10-28 Thread NotFound via RT
This example fails because the op find_method uses Parrot_ex_throw_from_c_args, that handles the exception in an inner runloop. From an opcode is better to use Parrot_ex_throw_from_op, wich jumps to the handler in the current runloop. I'm working on a patch that defines the helper function Parrot_

[perl #60166] [BUG] Exception handling in parrot doesn't unwind stack.

2008-10-27 Thread via RT
# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #60166] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60166 > Hello. Exception handling in parrot doesn't unwind used stack frames. Simple examp