Well, that was festive. "I can reproduce that bug in 22 lines!"

I expect the following code to print out a single colon (since PerlUndef prints as the empty string) and a newline. Instead, I get:

:get_string() not implemented in class 'RetContinuation'

which shows that the PerlUndef I assigned to $P1 in _main has morphed into a RetContinuation after the call to __outer in __main.

How to avoid tripping the bug:

1) call __inner from __main directly, instead of outer.
2) comment out the newsub line in __inner. (Or, convert the newsub to a "$P1 = new PerlString\n$P1 = "a", which may be a more useful example)


Note that I never actually set_eh the Exception Handler. I merely instantiate it and never call it. (Nor do I call __ignore -- I could change the IMC so that the handler called __outer instead of __ignore and drop the __ignore, but this is a little clearer, I think.)

I fully expect to be told I'm missing something obvious, which, since it's 1:30 in the morning, would be expected, but since I started tracking this down when it was still yesterday, would also be rather sad. =-)

.pcc_sub __main prototyped
  $P1 = new PerlUndef
  print $P1
  print ":"
  __outer()
  print $P1
  print "\n"
  end
.end
.pcc_sub __outer prototyped
   __inner()
  .pcc_begin_return
  .pcc_end_return
.end
.pcc_sub __inner prototyped
  newsub $P1, .Exception_Handler, __ignore
  .pcc_begin_return
  .pcc_end_return
.end
.sub __ignore
  noop
.end


On Tuesday, January 27, 2004, at 07:53 PM, Will Coleda wrote:


Sorry about the delay in responding.

My current sample program is 2760 lines of imcc in 23 files, plus a small .tcl script.

I'll see if I can trim that down to a more reasonable test case.

On Monday, January 26, 2004, at 05:32 AM, Leopold Toetsch wrote:

Will Coleda <[EMAIL PROTECTED]> wrote:
I'm trying to track down a problem with a PerlArray that is getting
modified on me.

I have a snippet of code like:

Could you please provide a complete program, that imposes the bug?


leo


--
Will "Coke" Coleda will at coleda dot com



--
Will "Coke" Coleda will at coleda dot com




Reply via email to