[perl #57088] Tcl's [lsort] failure (aka inferior runloop problem)

Will Coleda via RT parrotbug-followup at parrotcode.org
Tue Jan 27 21:34:28 UTC 2009


On Thu Nov 20 06:51:59 2008, coke wrote:
> On Tue Nov 11 05:33:51 2008, coke wrote:
> > On Fri Jul 18 15:29:16 2008, coke wrote:
> > > In trunk, partcl fails this way:
> > 
> > partcl is no longer in trunk, but this still fails in the same way.
> > 
> > http://code.google.com/p/partcl 
> 
> This error is reproducible with the following command line:
> 
> $ ./tclsh -e 'lsort -integer {10 10.2}'
> expected integer but got "10.2"
> attempt to access code outside of current code segment
> 

Here is a sample that shows the problem with no actual tcl involved:

$ cat tclsh.pir
.sub _main :main
  .param pmc argv

  load_bytecode 'tcllib.pir'

  push_eh file_error
    $P1 = find_name '&lsort'
    $P1()
file_error:
  pop_eh
.end
$ cat tcllib.pir
.sub '&lsort'
  .local pmc compare
  compare = find_name 'intlike'

  $P0 = new 'ResizablePMCArray'
  $P0[0] = 1
  $P0[1] = 1

  $P0.'sort'(compare)
.end

.sub 'intlike'
  die 'expected foo'
.end
$ ../../parrot tclsh.pir
attempt to access code outside of current code segment

-- 
Will "Coke" Coleda


More information about the parrot-dev mailing list