[botan-devel] Cygwin failure creating initialization vector

Jack Lloyd lloyd at randombit.net
Mon Feb 21 10:32:57 EST 2011

Does it fail for a smaller value of size?

Does the program terminate, or hang/infinite loop, or ... ?

Does this code execute inside of a try/catch block? Some C++ runtimes,
including older versions of GCC's, will just silent abort in the case
of an uncaught exception. That would potentionally also explain the
bogus stack trace.

This constructor is actually only two lines of code, so could
you also try this program:

     Botan::AutoSeeded_RNG _rng;
     unsigned int size = 1452;
     Botan::SecureVector<Botan::byte> iv_val(size);
     _rng.randomize(&iv_val[0], size);

With printfs or some such in between, so see where exactly it fails;
this may help narrow down the problem a bit.


On Sun, Feb 20, 2011 at 06:51:22PM -0800, William K. Foster wrote:
> Hello,
> I have Cygwin building now, but when executing it fails on the last
> constructor:
>     Botan::AutoSeeded_RNG _rng;
>     unsigned int size = 1452;
>     Botan::InitializationVector iv(_rng, size);
> For some reason, I don't get any error message, and trying to attach with
> GDB gives a bogus stack trace.  The program just stops execution at this
> point with no message.
> The Cygwin environment is not working as well as my Centos one, but the code
> works fine up until this point of the InitializationVector constructor.
> How might I go about debugging why this fails here?
> Thanks.
> -William

> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://lists.randombit.net/mailman/listinfo/botan-devel

More information about the botan-devel mailing list