Snapshots for CURRENT
Julien ÉLIE
julien at trigofacile.com
Tue Aug 21 11:21:03 UTC 2007
> En réponse à Russ Allbery :
>>> By the way, I have for innd/artparse.t:
>>
>>> ==9259== Invalid write of size 1
>>> ==9259== at 0x805257F: ARTsetup (art.c:287)
>>> ==9259== by 0x8051628: initialize (artparse-t.c:98)
>>> ==9259== by 0x8051A19: main (artparse-t.c:175)
>>> ==9259== Address 0x42DF927 is 1 bytes before a block of size 1 alloc'd
>>> ==9259== at 0x401D38B: malloc (vg_replace_malloc.c:149)
>>> ==9259== by 0x80A296A: x_strdup (xmalloc.c:128)
>>> ==9259== by 0x8052569: ARTsetup (art.c:286)
>>> ==9259== by 0x8051628: initialize (artparse-t.c:98)
>>> ==9259== by 0x8051A19: main (artparse-t.c:175)
>>
>> I haven't looked at that in detail yet, but that definitely looks like a
>> bug.
I tried to do that:
Index: artparse-t.c
===================================================================
--- artparse-t.c (révision 7651)
+++ artparse-t.c (copie de travail)
@@ -94,7 +94,8 @@
if (Log == NULL)
sysdie("Cannot open /dev/null");
fdreserve(4);
- buffer_set(&Path, "", 1);
+ buffer_set(&Path, "news.example.com!", 17);
+ Path.used += 17;
ARTsetup();
}
because it would prevent Path.used (= 0) to break ARTsetup in art.c:
/* Get our Path name, kill trailing !. */
ARTpathme = xstrdup(Path.data);
ARTpathme[Path.used - 1] = '\0';
Perhaps we ought to make sure that Path.used is not 0
with an ASSERT here in art.c?
Now, what strikes me most is that there is a new error in valgrind
when I run the test:
==29891== Conditional jump or move depends on uninitialised value(s)
==29891== at 0x401E215: strlen (mc_replace_strmem.c:246)
==29891== by 0x8094506: x_strdup (xmalloc.c:127)
==29891== by 0x8056EB9: ARTsetup (art.c:286)
==29891== by 0x8051741: main (artparse-t.c:99)
char *
x_strdup(const char *s, const char *file, int line)
{
char *p;
size_t len;
len = strlen(s) + 1; <----------------------------------------
And it looks the same as what there is in chan.t (the test which currently
makes snapshots fail, with "strcmp (mc_replace_strmem.c:341)").
--
Julien ÉLIE
« Vina bibant homines, animantia cetera fontes. »
More information about the inn-workers
mailing list