Given this code, which requires that you've built languages/tcl:

.sub main :main
  load_bytecode 'languages/tcl/runtime/tcllib.pir'
  $P1 = compreg 'PIR'
  $P2 = $P1(<<'EO_PIR')
.HLL 'Tcl', ''
.sub '_anon' :anon
  '&namespace'('eval', 'tcltest', "set a 1;proc b {} {}")
  print "ok\n"
.end
EO_PIR

  $P2() # works
  $S2 = freeze $P2
  $P3 = thaw $S2
  $P3() # vomits
.end


I expect it to print 'ok' 2x. However, it prints ok once, and then gives a bus error.

The tcl that is [namespace eval'd] here is important. if you remove the proc, it works. If you remove the set, it works. However, if you just switch the order of the set and the proc, it still fails.

I'll see if I can get this down to just PIR, without any tcl, but figured I'd post this in the meantime, in case this was small enough that someone might be able to figure out. (It started out as nearly 1kloc of generated PIR).

Regards.

--
Will "Coke" Coleda
[EMAIL PROTECTED]


Reply via email to