NNTPC: One 'memory currupt' fixed + caching question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > Looking at the DoIPC() routine, we see that it free()s the val
> > pointer returned from hisGetDbz(). But the pointer is a static in
> > hisGetDbz(), and is also free()d there at line 130 if non-NULL.
> 
> No.  The pointer variable is static in hisGetDbz, but the actual string pointed
> to is not static.  So the frees are correct.

Of course the string is not static. I just don't understand how it can
be correct to free the string returned from hisGetDbz() in DoIPC(), as
long as the (static) pointer to the same string in DoIPC() isn't set
to 0. Next time around in DoIPC(), you'll free a block of memory which
has already been freed.

This is quite repeatable, by the way. I have a bunch of messages which
will lead to the 'Memory currupt' message unless I change ipc.c the
way I indicated.

> > And after this change, it seems to run very nice and stable, without
> > the 'Memory currupt' problems.
> 
> It's probably a coincidence.

I'm afraid I don't believe so, since I can repeat it at will.

> > Now for a question. If I access an article by article number within a
> > group, it is read from the upstream feed the first time, and returned
> > from the cache if I access the same article number again. On the other
> > hand, if I access the same article by message ID, it is read from the
> > upstream feed every time:
> 
> Seems to be a sign of history "corruption".  I'll look into it.

Is there a good way of removing *one* article from the cache? Say I want
to force a reload of this article from the upstream server the next time
it is accessed.

Steinar Haug, Nethelp consulting, sthaug@nethelp.no


[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux