Re: [Bmf-user] Segmentation fault with text database.
Status: Beta
Brought to you by:
t-m
From: Tom M. <to...@ho...> - 2003-05-08 15:18:24
|
When the file is opened, what is its size? Can you run under gdb and print the value of "st"? There is a possibility that the size may be greater than zero but less than a full line. If that is not the case, I am at a loss to explain it. It looks like the sscanf string is proper. On Wed, May 07, 2003 at 02:33:25PM +0200, Jan Johansson wrote: > Hello, >=20 > I am experiencing an 'Segmentation fault' on mails that are a bit > larger and have located where things go wrong. >=20 > First time everything goes well, the database is created and > looks fine. >=20 > Second time gives. > tuvok$ cat testmail | bmf -vvvv -f text -p > Verbose level now 1 > Verbose level now 2 > Verbose level now 3 > Verbose level now 4 > Input looks like an mbox > Segmentation fault (core dumped) >=20 > gdb says > (gdb) bt > #0 0x5c0476b6 in sscanf () > #1 0x1c002c40 in dbtext_db_opentable () > #2 0x1c001256 in main () > #3 0x1c000d21 in ___start () > #4 0x1c000c97 in _start () > #5 0xcfbfd6a4 in ?? () > #6 0x543c0008 in ?? () > Cannot access memory at address 0xe0ffff0f. >=20 > And to be certain I applied this patch > tuvok$ diff -u dbtext.c.orig dbtext.c > --- dbtext.c.orig Wed May 7 14:25:48 2003 > +++ dbtext.c Wed May 7 14:27:43 2003 > @@ -202,10 +202,12 @@ > } > =20 > /* XXX: bogofilter compatibility */ > + verbose( 1, "Before bogofilter sscanf.\n" ); > if( sscanf( ptable->pbuf, BOGOFILTER_HEADER, &ptable->nmsgs) !=3D 1 ) > { > goto bail_fuc; > } > + verbose( 1, "After bogofilter sscanf.\n" ); > pbegin =3D ptable->pbuf; > while( *pbegin !=3D '\n' ) pbegin++; > pbegin++; >=20 > And the result is > tuvok$ cat testmail | bmf -vvvv -f text -p > Verbose level now 1 > Verbose level now 2 > Verbose level now 3 > Verbose level now 4 > Input looks like an mbox > Before bogofilter sscanf. > Segmentation fault (core dumped) >=20 > This is OpenBSD 3.3, bmf 0.9.4 and testmail is aviable at > http://www.isk.kth.se/~janj/bmf/testmail >=20 > Any suggestions would be appreciated. >=20 > Jan J >=20 >=20 >=20 >=20 > ------------------------------------------------------- > Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara > The only event dedicated to issues related to Linux enterprise solutions > www.enterpriselinuxforum.com >=20 > _______________________________________________ > Bmf-user mailing list > Bmf...@li... > https://lists.sourceforge.net/lists/listinfo/bmf-user --=20 Guilty until proven innocent: abusing the legal system in the name of the war on terror. http://www.wired.com/news/conflict/0,2100,58326,00.html |