https://bugs.openldap.org/show_bug.cgi?id=10378
Issue ID: 10378 Summary: A default build should NOT trigger asserts Product: OpenLDAP Version: 2.6.10 Hardware: All OS: All Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: libraries Assignee: bugs@openldap.org Reporter: daniel@haxx.se Target Milestone: ---
Hello OpenLDAP peeps!
The other day I filed a bug [1] against Debian's OpenLDAP packaging because the library they ship can assert and abort due to run-time conditions.
A library should never abort (in a release build) but should return a proper error code to allow the application to decide the appropriate next step.
I was then informed that this build setup is what upstream (you) recommend and encourage by default.
So, I'm here with a weak bug that I think you should shoot down and close immediately if I am wrong.
I want to make sure that Debian is wrong, and that we can use OpenLDAP libs in production without causing asserts going forward.
Surely Debian can just switch off the debug option, run without asserts and not lose any important functionality?
[1] = https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1109791
Thanks!
/ Daniel
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.
https://bugs.openldap.org/show_bug.cgi?id=10378
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Keywords|needs_review | Resolution|--- |INVALID
https://bugs.openldap.org/show_bug.cgi?id=10378
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED