/[Apache-SVN]
ViewVC logotype

Revision 1909117


Jump to revision: Previous Next
Author: ylavic
Date: Thu Apr 13 09:14:08 2023 UTC (12 months, 3 weeks ago)
Changed paths: 1
Log Message:
apr_base64: Don't fault with assert() when NDEBUG is defined, abort() directly.

Per Evgeny:
"""
1) The debug implementation of an assert() may print a diagnostic message,
for example to stderr.  A caller of the library function may not be ready for
this to happen when using a non-debug version of the library.

2) The actual destination of the message seems to be implementation-defined.
For example, in Windows-based applications this may show a message box [1],
which is probably even more unexpected for the user of the library.

3) Undefining NDEBUG before other headers may silently cause unexpected
effects if any of those headers make some decisions based on the NDEBUG value,
which isn't an entirely unreasonable thing to expect.
"""

We want to always fault on failure though, so define and use our own
APR__ASSERT() macro which calls abort() directly when NDEBUG is defined.



Changed paths

Path Details
Directoryapr/apr/trunk/encoding/apr_base64.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26