I'm fine with this as long as it doesn't change behavior on Windows /
Visual Studio, which normally catches asserts and uncatched exceptions
by default :)

BR

JPM

Am 15.07.2015 um 22:27 schrieb Jeffrey Walton:
> I'm catching an assert when running with -DDEBUG (i.e., not -DNDEBUG):
>
>     cryptest.exe: misc.h:703: T CryptoPP::rotlMod(T, unsigned int)
>         [with T = unsigned int]: Assertion `y <= 255' failed.
>
> The assert is fine. I adore asserts, because they create "self
> debugging code". When the code tells me where the problem is, I don't
> have to spend time under a debugger. In code under my purview in real
> life, we make debug instrumentation a security gate because it so
> helpful. If code does not have the instrumentation, it cannot be
> checked in.
>
> The issue I have is Posix's default behavior of "lets crash the
> program while the developer is debugging it". Its completely useless
> behavior.
>
> I want to cut-in a CRYPTOPP_ASSERT. The CRYPTOPP_ASSERT will do
> everything assert does, but it will raise a SIG_TRAP rather than
> SIG_ABRT. SIG_TRAP will snap the debugger if present. If not present,
> you sometimes get a message on the console. In both cases, the program
> continues.
>
> You can see an example of the improved assert at
> https://code.google.com/p/owasp-esapi-cplusplus/source/browse/trunk/esapi/EsapiCommon.h
> (line 183).
>
> Are there any comments or objections to cutting in a CRYPTOPP_ASSERT?
> -- 
> -- 
> You received this message because you are subscribed to the "Crypto++
> Users" Google Group.
> To unsubscribe, send an email to
> [email protected].
> More information about Crypto++ and this group is available at
> http://www.cryptopp.com.
> ---
> You received this message because you are subscribed to the Google
> Groups "Crypto++ Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to