Ticket #1034 (closed bug: fixed)

Opened 5 years ago

Last modified 3 years ago

attempt to access code outside of current code segment

Reported by: coke Owned by:
Priority: normal Milestone:
Component: none Version: trunk
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

See the  Original report.

This PIR errors on exit:

$ 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

Note that adding an 'exit 0' before the .end in the first file avoids the error.

Change History

Changed 5 years ago by NotFound

Adding:

  .get_results($P2)
  unroll $P2

between "file_error:" and "pop_eh" avoids the problem.

unroll has been added as experimental in 2.4.0

Changed 3 years ago by NotFound

  • status changed from new to closed
  • resolution set to fixed

unroll was renamed to finalize, is not yet experimental and is the official way to handle this issus.

Clossing.

Note: See TracTickets for help on using tickets.