[Xapian-discuss] Visibility Problem in Perl Bindings for MultiValueSorter

Markus Wörle mrks at mrks.de
Mon Jan 14 20:46:07 GMT 2008


Hi again,

I recently discovered that

{
     my $sorter = new Search::Xapian::MultiValueSorter(1,2);
     $enq->set_sort_by_key($sorter);
}
my $mset = $enq->get_mset(0, 5);

segfaults in get_mset(), but

my $sorter;
{
     $sorter = new Search::Xapian::MultiValueSorter(1,2);
     $enq->set_sort_by_key($sorter);
}
my $mset = $enq->get_mset(0, 5);

works well.

I think there is a visibility-problem in the XS or C++ code. Looks  
like the $enq object just contains a reference on the sorter, and as  
soon as the referee becomes invisible it breaks.

Regards,
mrks





More information about the Xapian-discuss mailing list