https://bugs.openldap.org/show_bug.cgi?id=10378
--- Comment #1 from Howard Chu hyc@openldap.org --- The remaining asserts in libldap and liblber are merely checks that required function parameters are present/valid. They will detect misuses of the API but won't trigger on properly written code, so they have no production impact.
The assert you ran into before was an isolated bug.
Switching off debug will also disable all output of diagnostic messages, so no that's not recommended.
Switching off asserts means misuses of the API may trigger null pointer dereferences instead of assertions, which presumably would only affect young code in its development phase. But for now we see no reason to make that change.