a problem in sentence

From: <fantacywall@dont-contact.us>
Date: Thu, 09 Feb 2006 01:40:56 +0000

I was remending the squid source code(squid2.5 stable12) to record more
informations in swap.state.When i insert a sentence into the
lines.....:(src/fs/aufs/store_dir_aufs.c :storeAufsDirSwapLog)

static void
storeAufsDirSwapLog(const SwapDir * sd, const StoreEntry * e, int op)
{
    squidaioinfo_t *aioinfo = (squidaioinfo_t *) sd->fsdata;
    storeSwapLogData *s = memAllocate(MEM_SWAP_LOG_DATA);
    //i insert a sentence here,it's the only place i remend,just to print
url
    debug(47,1) ("Current url is : %s\n",e->mem_obj->url);
    
    s->op = (char) op;
    s->swap_filen = e->swap_filen;
    ..........

squid works well the first time(it print the url of the requests and seems
have no error).but when i restart it,i got a error:
........
2006/02/09 09:23:52| Accepting HTTP connections at 0.0.0.0, port 777, FD
11.
2006/02/09 09:23:52| Accepting ICP messages at 0.0.0.0, port 3130, FD 12.
2006/02/09 09:23:52| WCCP Disabled.
2006/02/09 09:23:52| Ready to serve requests.
Segmentation fault

when i reset the swap.state(echo > swap.state),i can start the squid
again......
i am wondering how can this happened.Why can just a print sentence cause
such problem?
Received on Wed Feb 08 2006 - 19:28:21 MST

This archive was generated by hypermail pre-2.1.9 : Tue Feb 28 2006 - 12:00:05 MST