On Friday, July 31, 2015 at 3:22:14 AM UTC-4, Jeffrey Walton wrote:
>
> At Frame 0:
>
> #1 0x00497c57 in CryptoPP::Rijndael::Enc::AdvancedProcessBlocks (
> this=this@entry=0x7b10d0 <s_globalRNG+48>,
> inBlocks=inBlocks@entry=0x2e92990 "1438287574",
> xorBlocks=xorBlocks@entry=0x0, ...
>
> You are passing a NULL buffer into the function.
>
> From Frame 8:
>
> #8 0x0042d704 in _fu94___ZNSs4_Rep20_S_empty_rep_storageE ()
> at datatest.cpp:123
>
> I'm guessing you have global variables, and they are not being initialized
> in the order you expect them to be initialized in.
>
> Switch to this pattern:
>
> RandomNumberGenerator & GlobalRNG()
> {
> static OFB_Mode<AES>::Encryption s_globalRNG;
> return s_globalRNG;
> }
>
> I'll fix the code in test.cpp so other's don't get into the bad habit...
>
> Its a bad habit precisely because the C++ standard does not impose any
> guarantees on the initialization of static objects in a translation unit.
> Linux and Windows are pretty good about avoid this particular issue. The
> problem gets worse on OS X.
>
This was checked in at
https://github.com/weidai11/cryptopp/commit/3caada0a9eb506bfbd54d46517d646b43a00882b.
Jeff
--
--
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.