Re: two xasserts in squid3

From: Amos Jeffries <squid3@dont-contact.us>
Date: Tue, 12 Feb 2008 10:31:44 +1300 (NZDT)

> Alex Rousskov wrote:
>> On Sun, 2008-02-10 at 20:51 +0200, Tsantilas Christos wrote:
>>> Maybe it was better if the files lib/assert.c and include/assert.h
>>> removed and the assert macro defined in squid.h file like squid2.6
>>> does...
>>
>> It looks like Array, MemPool, and splay files are using assert outside
>> of src/ so you will not be able to remove include/assert.h. However, you
>> may be able to declare xassert in include/assert.h while defining it in
>> src/Debug.cc.
>>
>
> It is not the best to have the declaration at library headers
> (include/*) and the definition in program sources, but yes looks that it
> is the safest solution at this time.
>
> Should I fix it in async-calls branch, or someone else will do the job
> in squid3-HEAD?

I have yesterday created a branch "cleanup" in Squid-3 for the purpose of
performing the larger cleanup operations instead of HEAD.
This is so we can maintain better stability in HEAD and the bigger or more
experimental changes can be done and tested in cleanup before going
mainstream.

Feel free to do it there and see what breaks.

Amos

>
>> The assert #define in src/Debug.h should probably be moved to
>> include/assert.h. These #defines must be the same.
>
> Are not exactly the same. In the Debug.h implementation there is an
> extra #if PURIFY ....".
> The "assert.h" file included at the begining of squid.h file and the
> Debug.h included in defines.h file which also included at the squid.h.
> It is not clear with a first view which assert called, and I wondering
> if there is a trick here..
>
>
>
>
Received on Mon Feb 11 2008 - 14:31:50 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:09 MST