[KinoSearch] Bug in binding of fetch_sim (Re: Fwd: CPAN Upload: S/SP/SPROUT/KSx-Highlight-Summarizer-0.05.tar.gz)

Marvin Humphrey marvin at rectangular.com
Mon May 11 12:03:06 PDT 2009


On Mon, May 11, 2009 at 09:56:37AM -0700, webmasters at ctosonline.org wrote:
> 
> On May 10, 2009, at 3:17 PM, Marvin Humphrey wrote:
> 
> > BTW, I see the docs specify List::Util as a prerequisite.  However, KS
> > requires Perl 5.8.3 as a minimum version, and List::Util became core  
> > in 5.7.3:
> >
> > ... so you can zap that.
> 
> You’re not going to consider backporting it? :-)

Nope.  :)

Too many Perl Unicode bugs before 5.8.3.

> I have just found another binding bug. I encountered this with  fetch_sim,
> but it probably applies elsewhere, too.

The fetch_sim bug was probably fixed by r4565.

    r4565 | creamyg | 2009-05-10 17:34:25 -0700 (Sun, 10 May 2009) | 3 lines

    Fix a glitch in Schema_Fetch_Sim where return value wasn't specified.
    (Hmm, why was this working at all?)

Before that, Schema_fetch_sim didn't have a return statement, so whatever
called it was going to get whatever was left on the C stack.

    Similarity*
    Schema_fetch_sim(Schema *self, const CharBuf *field)
    {
        Similarity *sim = NULL;
        if (field != NULL) {
            sim = (Similarity*)Hash_Fetch(self->sims, field);
        }
    }

There was a compiler warning that I'd been ignoring, but I hadn't realized it
was that serious.  (Usually a "control reaches end of function" warning
indicates that there's a THROW statement that isn't followed by an
UNREACHABLE_RETURN to quiet the compiler.)

I suggest rev 4572 (which passes test_valgrind).

Marvin Humphrey




More information about the kinosearch mailing list