diff --git a/trap.h b/trap.h index a34be810..04cd33e2 100644 --- a/trap.h +++ b/trap.h @@ -2,14 +2,18 @@ /// \file trap.h /// \brief Debugging and diagnostic assertions -/// \details CRYPTOPP_ASSERT is the library's debugging and diagnostic assertion. CRYPTOPP_ASSERT -/// is enabled by CRYPTOPP_DEBUG, DEBUG or _DEBUG. -/// \details CRYPTOPP_ASSERT raises a SIGTRAP (Unix) or calls __debugbreak() (Windows). -/// CRYPTOPP_ASSERT is only in effect when the user requests a debug configuration. Unlike Posix assert, +/// \details CRYPTOPP_ASSERT is the library's debugging and diagnostic +/// assertion. CRYPTOPP_ASSERT is enabled by CRYPTOPP_DEBUG, +/// DEBUG or _DEBUG. +/// \details CRYPTOPP_ASSERT raises a SIGTRAP (Unix) or calls +/// __debugbreak() (Windows). CRYPTOPP_ASSERT is only in +/// effect when the user requests a debug configuration. Unlike Posix assert, /// NDEBUG (or failure to define it) does not affect the library. -/// The traditional Posix define NDEBUG has no effect on CRYPTOPP_DEBUG or DebugTrapHandler. +/// The traditional Posix define NDEBUG has no effect on +/// CRYPTOPP_DEBUG or DebugTrapHandler. /// \since Crypto++ 5.6.5 -/// \sa DebugTrapHandler, Issue 277, +/// \sa DebugTrapHandler, Issue 277, /// CVE-2016-7420 #ifndef CRYPTOPP_TRAP_H @@ -32,17 +36,21 @@ #if defined(CRYPTOPP_DOXYGEN_PROCESSING) /// \brief Debugging and diagnostic assertion -/// \details CRYPTOPP_ASSERT is the library's debugging and diagnostic assertion. CRYPTOPP_ASSERT -/// is enabled by the preprocessor macros CRYPTOPP_DEBUG, DEBUG or _DEBUG. -/// \details CRYPTOPP_ASSERT raises a SIGTRAP (Unix) or calls DebugBreak() (Windows). -/// CRYPTOPP_ASSERT is only in effect when the user explicitly requests a debug configuration. -/// \details If you want to ensure CRYPTOPP_ASSERT is inert, then do not define -/// CRYPTOPP_DEBUG, DEBUG or _DEBUG. Avoiding the defines means CRYPTOPP_ASSERT -/// is preprocessed into an empty string. -/// \details The traditional Posix define NDEBUG has no effect on CRYPTOPP_DEBUG, CRYPTOPP_ASSERT -/// or DebugTrapHandler. -/// \details An example of using \ref CRYPTOPP_ASSERT "CRYPTOPP_ASSERT" and DebugTrapHandler is shown below. The library's -/// test program, cryptest.exe (from test.cpp), exercises the structure: +/// \details CRYPTOPP_ASSERT is the library's debugging and diagnostic +/// assertion. CRYPTOPP_ASSERT is enabled by the preprocessor macros +/// CRYPTOPP_DEBUG, DEBUG or _DEBUG. +/// \details CRYPTOPP_ASSERT raises a SIGTRAP (Unix) or calls +/// DebugBreak() (Windows). CRYPTOPP_ASSERT is only in effect +/// when the user explicitly requests a debug configuration. +/// \details If you want to ensure CRYPTOPP_ASSERT is inert, then do +/// not define CRYPTOPP_DEBUG, DEBUG or _DEBUG. +/// Avoiding the defines means CRYPTOPP_ASSERT is preprocessed into an +/// empty string. +/// \details The traditional Posix define NDEBUG has no effect on +/// CRYPTOPP_DEBUG, CRYPTOPP_ASSERT or DebugTrapHandler. +/// \details An example of using CRYPTOPP_ASSERT and DebugTrapHandler is shown +/// below. The library's test program, cryptest.exe (from test.cpp), +/// exercises the structure: ///
 ///    #if defined(CRYPTOPP_DEBUG) && defined(UNIX_SIGNALS_AVAILABLE)
 ///    static const DebugTrapHandler g_dummyHandler;
@@ -55,7 +63,8 @@
 ///    }
 ///  
/// \since Crypto++ 5.6.5 -/// \sa DebugTrapHandler, SignalHandler, Issue 277, +/// \sa DebugTrapHandler, SignalHandler, Issue 277, /// CVE-2016-7420 # define CRYPTOPP_ASSERT(exp) { ... } #endif