[perl #38432] [BUG] Exception thrown from constructor leads to oddness

Will Coleda via RT parrotbug-followup at parrotcode.org
Thu Jul 9 13:23:48 UTC 2009

On Wed Oct 15 12:42:23 2008, coke wrote:
> On Tue Sep 16 18:20:36 2008, amosrobinson wrote:
> > No segfaults here either, with your PIR. (r31173, vanilla ubuntu)
> > 
> > On Tue Sep 02 12:45:34 2008, tene wrote:
> > > I don't get a segfault when running the test case without the 
> > > opcode.  Can anyone else confirm if this still segfaults?
> > 
> Here's yet another updated version (this time for the exception 
> of the test that doesn't segfault, but still generates incorrect 
> (generates both an OK line and a NOK line)

Here is yet another updated version of the code:

.sub main :main
    .local pmc type
    newclass type, 'Parent'

    .local pmc obj, exception
    .local string message
    message = 'no error'
    push_eh handler
        obj = new 'Parent'
        print 'not '
    goto finally

    message = exception

    print "ok #"
    say message

.namespace ['Parent']

.sub 'init' :vtable
    die 'test exception from init vtable'

Which generates:

ok #test exception from init vtable
not No handler to delete.

The second line should not be printing.

Will "Coke" Coleda

More information about the parrot-dev mailing list