help-gift
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-GIFT] gift-write-feature-descs segfaults... (is the GIFT broke


From: David Squire
Subject: Re: [help-GIFT] gift-write-feature-descs segfaults... (is the GIFT broken?)
Date: Sun, 27 Aug 2006 15:50:29 +0100
User-agent: Thunderbird 1.5.0.5 (Macintosh/20060719)

address@hidden wrote:
Jonas:

This is undoubtedly my fault, for not checking the other binaries.

There is a general lesson here. Before committing any patches, a full build of the whole system, and test cases run (e.g. adding a collection and testing that it can be queried).
I've been under the weather recently, and i've only been checking
the gift-extract-features binary.

I'll try to get a fix in sometime this evening..

Yes, normally C screams and yells at you, but the gift was written
without function prototypes, so the compiler cant tell, until link time.

I'll also whip up a quick patch adding function prototypes, and post
it to the mailing list, for review.

This is not true, strictly speaking. the feature extraction code *was* written with function prototypes (generated by cproto). I've just looked at the start of extract_features.c in version 0.1.14, and I see:

#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <math.h>
#include <string.h>
#include <unistd.h>
#include <ppm.h>
#include "gift_features.h"
//#include "extract_features.proto"

So, at some point a decision was made to do without the prototypes. In my original version (from Viper, before it was bundled with the GIFT), that starts:

#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <math.h>
#include <string.h>
#include <unistd.h>
#include <ppm.h>

#include "extract_features.proto"

I would guess that that changed because someone did not have access to cproto...

Cheers,

David (also under the weather)


--
Dr David McG. Squire, Senior Lecturer, on sabbatical in 2006
Caulfield School of Information Technology, Monash University, Australia
CRICOS Provider No. 00008C       http://www.csse.monash.edu.au/~davids/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]