On sön, 2007-09-16 at 19:54 +0200, Henrik Nordstrom wrote: > On sön, 2007-09-16 at 13:24 +0200, Thomas-Martin Seck wrote: > > > The segfaults occur only on the HEAD FreeBSD branch (7-CURRENT). We > > tried to see whether this is a compiler issue (FreeBSD 7 will ship with > > gcc 4.2.1 as the system compiler while FreeBSD-6 uses 3.4.6) and found > > that it probably is not: on FreeBSD 6, cf_gen works even when gcc 4.2.1 > > is used to compile Squid while on FreeBSD HEAD it always fails, even > > when compiling Squid with gcc 3.4. (It might be a more subtle compiler > > issue regarding system libraries nonetheless. I posted about this > > problem a week ago on the FreeBSD-current development list but got no > > reply so far.) > > Could also be some uninitialized data.. > > > I see the same issues with 3.0.PRE7 when it is patched up to changeset > > 11081; the info I get from the core is almost identical. > > Ok. Same code, same error. Feels logical... > > > > #0 0x28152226 in strcmp () from /lib/libc.so.7 > > #1 0x08048da6 in checkDepend (directive=0x282058c0 "external_acl_type", > > name=0xbfbfe11e "externalAclHelper", types=0x282025e0, > > entries=0x28207730) > > at cf_gen.c:133
Found a significant error related to this. Please try the attached patch, and please file a bug report so I have something to refer to.. Regards Henrik
? bootstrap ? http11 ? helpers/basic_auth/LDAP/t ? scripts/merge-cf.data.pre.pl ? scripts/split-cf.data.pre.pl ? src/cf_gen.cc Index: src/cf_gen.c =================================================================== RCS file: /cvsroot/squid/squid/src/cf_gen.c,v retrieving revision 1.52 diff -u -p -r1.52 cf_gen.c --- src/cf_gen.c 6 Sep 2007 09:33:36 -0000 1.52 +++ src/cf_gen.c 16 Sep 2007 17:57:24 -0000 @@ -183,7 +183,7 @@ main(int argc, char *argv[]) t = (Type *) xcalloc(1, sizeof(*t)); t->name = xstrdup(type); while ((dep = strtok(NULL, WS)) != NULL) { - TypeDep *d = (TypeDep *) xcalloc(1, sizeof(*dep)); + TypeDep *d = (TypeDep *) xcalloc(1, sizeof(*d)); d->name = xstrdup(dep); d->next = t->depend; t->depend = d;
signature.asc
Description: This is a digitally signed message part