# New Ticket Created by  Roger Browne 
# Please include the string:  [perl #37332]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37332 >


---
osname= linux
osvers= 2.4.21-27.0.2.elsmp
arch=   i386-linux-thread-multi
cc=     gcc 4.0.0 20050516 (Red Hat 4.0.0-6)
---
Flags:
    category=core
    severity=medium
    ack=no
---
The following PIR code that works differently under 0.2.3 and 0.3.0:

.sub "main" @MAIN
   push_eh MAIN_HANDLER
   foo()
   clear_eh
   end
  MAIN_HANDLER:
   print "in main handler\n"
   rethrow P5
.end

.sub "foo"
   push_eh FOO_HANDLER
   new $P1, .Exception
   $P1["_message"] = "my_error_message"
   throw $P1
   clear_eh
   .return()
  FOO_HANDLER:
   print "in foo handler\n"
   rethrow P5
.end

Under 0.2.3 it prints

   in foo handler
   in main handler

before dying, which in my opinion is the expected behaviour. Under
0.3.0 it prints this before dying:

   in foo handler
   in main handler
   in main handler

In other words, the 'rethrow' within MAIN_HANDLER is causing 
MAIN_HANDLER to be entered a second time.

Roger Browne.

---
Summary of my parrot 0.3.0 (r0) configuration:
  configdate='Sun Oct  2 22:30:54 2005'
  Platform:
    osname=linux, archname=i386-linux-thread-multi
    jitcapable=1, jitarchname=i386-linux,
    jitosname=LINUX, jitcpuarch=i386
    execcapable=1
    perl=/usr/bin/perl
  Compiler:
    cc='gcc', ccflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING  -pipe 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-I/usr/include/gdbm',
  Linker and Libraries:
    ld='gcc', ldflags=' -L/usr/local/lib',
    cc_ldflags='',
    libs='-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp'
  Dynamic Linking:
    share_ext='.so', ld_share_flags='-shared -L/usr/local/lib -fPIC',
    load_ext='.so', ld_load_flags='-shared -L/usr/local/lib -fPIC'
  Types:
    iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4,
    ptrsize=4, ptr_alignment=1 byteorder=1234, 
    nv=double, numvalsize=8, doublesize=8

---
Environment:
    HOME    LANG    LANGUAGE    LD_LIBRARY_PATH    LOGDIR    PATH    SHELL

Reply via email to