Whitespace check-in
parent
49daf12913
commit
dbc071f083
45
trap.h
45
trap.h
|
|
@ -105,26 +105,32 @@ NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
#if (CRYPTOPP_DEBUG && defined(UNIX_SIGNALS_AVAILABLE)) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
#if (CRYPTOPP_DEBUG && defined(UNIX_SIGNALS_AVAILABLE)) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
||||||
/// \brief Default SIGTRAP handler
|
/// \brief Default SIGTRAP handler
|
||||||
/// \details DebugTrapHandler() can be used by a program to install an empty SIGTRAP handler. If present,
|
/// \details DebugTrapHandler() can be used by a program to install an empty
|
||||||
/// the handler ensures there is a signal handler in place for <tt>SIGTRAP</tt> raised by
|
/// SIGTRAP handler. If present, the handler ensures there is a signal handler
|
||||||
/// <tt>CRYPTOPP_ASSERT</tt>. If <tt>CRYPTOPP_ASSERT</tt> raises <tt>SIGTRAP</tt> <em>without</em>
|
/// in place for <tt>SIGTRAP</tt> raised by <tt>CRYPTOPP_ASSERT</tt>. If
|
||||||
/// a handler, then one of two things can occur. First, the OS might allow the program
|
/// <tt>CRYPTOPP_ASSERT</tt> raises <tt>SIGTRAP</tt> <em>without</em>
|
||||||
/// to continue. Second, the OS might terminate the program. OS X allows the program to continue, while
|
/// a handler, then one of two things can occur. First, the OS might allow the
|
||||||
/// some Linuxes terminate the program.
|
/// program to continue. Second, the OS might terminate the program. OS X allows
|
||||||
/// \details If DebugTrapHandler detects another handler in place, then it will not install a handler. This
|
/// the program to continue, while some Linuxes terminate the program.
|
||||||
/// ensures a debugger can gain control of the <tt>SIGTRAP</tt> signal without contention. It also allows multiple
|
/// \details If DebugTrapHandler detects another handler in place, then it will not
|
||||||
/// DebugTrapHandler to be created without contentious or unusual behavior. Though multiple DebugTrapHandler can be
|
/// install a handler. This ensures a debugger can gain control of the
|
||||||
/// created, a program should only create one, if needed.
|
/// <tt>SIGTRAP</tt> signal without contention. It also allows multiple
|
||||||
/// \details A DebugTrapHandler is subject to C++ static initialization [dis]order. If you need to install a handler
|
/// DebugTrapHandler to be created without contentious or unusual behavior.
|
||||||
/// and it must be installed early, then reference the code associated with <tt>CRYPTOPP_INIT_PRIORITY</tt> in
|
/// Though multiple DebugTrapHandler can be created, a program should only create
|
||||||
|
/// one, if needed.
|
||||||
|
/// \details A DebugTrapHandler is subject to C++ static initialization [dis]order.
|
||||||
|
/// If you need to install a handler and it must be installed early, then
|
||||||
|
/// reference the code associated with <tt>CRYPTOPP_INIT_PRIORITY</tt> in
|
||||||
/// cryptlib.cpp and cpu.cpp.
|
/// cryptlib.cpp and cpu.cpp.
|
||||||
/// \details If you want to ensure <tt>CRYPTOPP_ASSERT</tt> is inert, then <em>do not</em> define
|
/// \details If you want to ensure <tt>CRYPTOPP_ASSERT</tt> is inert, then
|
||||||
/// <tt>CRYPTOPP_DEBUG</tt>, <tt>DEBUG</tt> or <tt>_DEBUG</tt>. Avoiding the defines means <tt>CRYPTOPP_ASSERT</tt>
|
/// <em>do not</em> define <tt>CRYPTOPP_DEBUG</tt>, <tt>DEBUG</tt> or
|
||||||
|
/// <tt>_DEBUG</tt>. Avoiding the defines means <tt>CRYPTOPP_ASSERT</tt>
|
||||||
/// is processed into <tt>((void)(exp))</tt>.
|
/// is processed into <tt>((void)(exp))</tt>.
|
||||||
/// \details The traditional Posix define <tt>NDEBUG</tt> has no effect on <tt>CRYPTOPP_DEBUG</tt>, <tt>CRYPTOPP_ASSERT</tt>
|
/// \details The traditional Posix define <tt>NDEBUG</tt> has no effect on
|
||||||
/// or DebugTrapHandler.
|
/// <tt>CRYPTOPP_DEBUG</tt>, <tt>CRYPTOPP_ASSERT</tt> or DebugTrapHandler.
|
||||||
/// \details An example of using \ref CRYPTOPP_ASSERT "CRYPTOPP_ASSERT" and DebugTrapHandler is shown below. The library's
|
/// \details An example of using \ref CRYPTOPP_ASSERT "CRYPTOPP_ASSERT" and
|
||||||
/// test program, <tt>cryptest.exe</tt> (from test.cpp), exercises the structure:
|
/// DebugTrapHandler is shown below. The library's test program,
|
||||||
|
/// <tt>cryptest.exe</tt> (from test.cpp), exercises the structure:
|
||||||
/// <pre>
|
/// <pre>
|
||||||
/// #if defined(CRYPTOPP_DEBUG) && defined(UNIX_SIGNALS_AVAILABLE)
|
/// #if defined(CRYPTOPP_DEBUG) && defined(UNIX_SIGNALS_AVAILABLE)
|
||||||
/// static const DebugTrapHandler g_dummyHandler;
|
/// static const DebugTrapHandler g_dummyHandler;
|
||||||
|
|
@ -137,7 +143,8 @@ NAMESPACE_BEGIN(CryptoPP)
|
||||||
/// }
|
/// }
|
||||||
/// </pre>
|
/// </pre>
|
||||||
/// \since Crypto++ 5.6.5
|
/// \since Crypto++ 5.6.5
|
||||||
/// \sa \ref CRYPTOPP_ASSERT "CRYPTOPP_ASSERT", SignalHandler, <A HREF="http://github.com/weidai11/cryptopp/issues/277">Issue 277</A>,
|
/// \sa \ref CRYPTOPP_ASSERT "CRYPTOPP_ASSERT", SignalHandler, <A
|
||||||
|
/// HREF="http://github.com/weidai11/cryptopp/issues/277">Issue 277</A>,
|
||||||
/// <A HREF="http://seclists.org/oss-sec/2016/q3/520">CVE-2016-7420</A>
|
/// <A HREF="http://seclists.org/oss-sec/2016/q3/520">CVE-2016-7420</A>
|
||||||
|
|
||||||
#if defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
#if defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue