Will Coleda <[EMAIL PROTECTED]> wrote:
> I'm trying to add exception handling support back in to tcl so I can
> trap references to non-existant variables. This is using a recent, but
> not just-now, cvs checkout.

> I am currently getting a segfault if I enable the exception handler.
> Running the code through -t, I see this near the end:

>    3844 set_eh P16       - P16=Exception_Handler=PMC(0x9e0518)
>    3846 find_lex P16, -1, S18    - P16=Exception_Handler=PMC(0x9e0518),
> , S18="a"
>    4094 print "excepted\n"
> excepted
>    4096 set P2, P5["_invoke_cc"]         - P2=NULL,
> P5=Exception=PMC(0x9e0500),
>    4100 invoke P2        - P2=RetContinuation=PMC(0x9e04e8)
>    3850 clear_eh
>    3851 print "HERE?\n"
> HERE?
>    3853 typeof S17, P16          - S17="Sub", P16=NULL

Null PMC access in name()

The problem is: you are clearing the exception handler in 3850 and then
in 3853 you access the non-existent lexical.

   find_lex lexical, -1, "xx"
   isnull lexical, no_such_variable
   clear_eh

I don't get the segfault here. This may be related to some fixes that
the stack changes include.

leo

Reply via email to