Ticket #1826 (closed bug: fixed)
custom cmp kills FixedIntegerArray::sort
Reported by: | cotto | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | none | Version: | 2.8.0 |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: |
Description
Passing a custom comparison sub to FixedIntegerArray's sort method causes a segfault in code that works as expected with FixedPMCArray. The only difference between the two scripts below is the type of $P0.
cotto@feather:/usr/src/parrot/parrot-svn-committable\ 1 $ cat inner.pir .sub main :main $P0 = new ['FixedPMCArray'] $P0 = 3 $P0[0] = 1 $P0[1] = 3 $P0[2] = 3 $P1 = get_global 'sorter' $P0.'sort'($P1) .end .sub sorter .param pmc a .param pmc b say "sort" .return (a) .end cotto@feather:/usr/src/parrot/parrot-svn-committable\ 1 $ ./parrot inner.pir sort sort sort cotto@feather:/usr/src/parrot/parrot-svn-committable\ 1 $ cat inner.pir .sub main :main $P0 = new ['FixedIntegerArray'] $P0 = 3 $P0[0] = 1 $P0[1] = 3 $P0[2] = 3 $P1 = get_global 'sorter' $P0.'sort'($P1) .end .sub sorter .param pmc a .param pmc b say "sort" .return (a) .end cotto@feather:/usr/src/parrot/parrot-svn-committable\ 1 $ ./parrot inner.pir Segmentation fault
Change History
Note: See
TracTickets for help on using
tickets.