Le dimanche 22 juillet 2007 à 15:10 +0100, jamie a écrit :
> On Sun, 2007-07-22 at 16:04 +0200, Laurent Aguerreche wrote:
> > Le dimanche 22 juillet 2007 à 14:51 +0100, jamie a écrit :
> > > On Sun, 2007-07-22 at 15:32 +0200, Michael Biebl wrote:
> > > > 2007/7/22, jamie <[EMAIL PROTECTED]>:
> > > > > can you pls do a valgrind -v trackerd
> > > > >
> > > > > memory corruption is obviously happening somewhere and only valgrind
> > > > > can
> > > > > tell us where
> > > >
> > > > Attached. HTH.
> > > >
> > > > Michael
> > >
> > >
> > > I have reverted laurents changes to set language and get default
> > > language
> > >
> > > can you retest with latest svn
> > >
> >
> >
> > Hum... I only changed some "tracker_log()" and cosmetic things like
> > "i=0" => "i = 0"...
> >
> >
> > In tracker-utils.c :
> >
> >
> > char *stem_language;
> >
> > /* set default language */
> > stem_language = "english";
> >
> > if (language) {
> > int i;
> >
> > for (i = 0; tmap[i].lang; i++) {
> > if ((strcasecmp (tmap[i].lang, language) == 0)) {
> > stem_language = tmap[i].name;
> > break;
> > }
> > }
> > }
> >
> > stem_language is set to "english" and I think stem_language is
> > statically allocated for 7 bytes. What would happen with "portuguese" in
> > tmp[i].name for instance?!
>
> stem_language = "english";
> thats a pointer to the stack so does not matter?
>
> (IE its not heap allocated)
Oups! Yes, you're right...
In tmap declaration, there is:
static Matches tmap[] = {
{"da", "danish"},
[....]
{"ru", "russian"},
{"es", "spanish"},
{"sv", "swedish"},
{NULL, 0},
};
At end, it should be {NULL, NULL}. No?
But it won't change anything here...
>
> tmap[i].name is also constant - I guess stem_language should be defined
> const char *
>
signature.asc
Description: Ceci est une partie de message numériquement signée
_______________________________________________ tracker-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/tracker-list
