Re: nepomukstrigiservice segfault (was: KDE Software Compilation 4.6.1 has been uploaded to qt-kde.debian.net)
On Sunday 03 April 2011, Sune Vuorela wrote:
> On 2011-04-03, Michael Schuerig <firstname.lastname@example.org> wrote:
> > nepomukstrigiservice has been happily indexing for 25 minutes now,
> > 21 more than before.
> What kind of changes did you do to the code?
I just removed the (char) cast. I.e.
> > I haven't yet reported this bug at strigi.sf.net, as sourceforge
> > appears to be down right now. It would be nice to have a patch in
> > the debian package soon, even before a new upstream is released.
> I just talked with upstream. He would really like to see the file
> that made you hit this thing.
It was this single line from a mail header
The notable thing about it is that it is quite a bit longer than 127
characters. See below if you need more convincing.
printf("CHAR_MAX: %d\n", CHAR_MAX);
printf("Proper: %lu\n", (unsigned long)(CHAR_MAX + 1));
printf("Overflow: %lu\n", (unsigned long)(char)(CHAR_MAX + 1));
printf("Negative: %lu\n", (unsigned long)(char)-(CHAR_MAX + 1));
prints on a 64bit system