[Date Prev][Date Next]
Re: slapd coredumps on search: use of assertions? (ITS#1308)
At 08:45 AM 2001-09-09, Peter W wrote:
>On Sun, Sep 09, 2001 at 03:34:57PM +0000, email@example.com wrote:
>> I have tried it with cvs REL_ENG_2 version and it also segfaults. The only
>> difference is that 2.0.12 always segfaults but REL_ENG_2 segfaults only if
>> this search is the first search.
>> slapd: acl.c:101: access_allowed: Assertion `attr != ((void *)0)' failed.
>Isn't there something better to use than generic assertion calls?
One could compile with NDEBUG and wait for the code to crash (or
worse) due to the invalid condition. But I don't consider that better.
The fact that this assert failed indicates a logic error. That logic
error needs to be corrected.
I do note that there are cases were assert() is inappropriately used
in OpenLDAP. Here the appropriate action is not to call exit() or
to crash or abruptly calling exit(), but for the routine to the
condition to be handled in a manner which allows slapd to continue
running or to shutdown in an orderly fashion.
Contributions in this area are quite welcomed.