id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	lang	patch	platform
1826	custom cmp kills FixedIntegerArray::sort	cotto		"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
}}}"	bug	closed	normal		none	2.8.0	medium	fixed					
