[perl #59968] [BUG] Calling Test::More sub after catching a div by zero exception segfaults

James Keenan via RT parrotbug-followup at parrotcode.org
Sun Feb 1 01:51:53 UTC 2009


Thanks.  Making that correction, I confirm that the OP's seg fault still
occurs:

$ cat seg.pir
.sub main :main
.include 'include/test_more.pir'

new $P0, 'Integer'
new $P2, 'Integer'
new $P1, 'Integer'

set $P0, 1
set $P2, 0

ok( 1, 'ready...' )

push_eh handler
$P1 = $P0 / $P2
ok( 0, "not caught" )
end
pop_eh
handler:
ok( 1, 'caught' ) # segfaults
# say "ok" # no problem with this
.end

# Local Variables:
#   mode: pir
#   fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:

$ ./parrot seg.pir
ok 1 - ready...
Segmentation fault



More information about the parrot-dev mailing list