test/bntest.c:1912: error: INTEGER_OVERFLOW_L1
  (0 - 1):unsigned64 by call to `BN_mod_exp`.
Showing all 14 steps of the trace


test/bntest.c:1912:10: Call
1910.       BN_zero(zero);
1911.   
1912.       if (!TEST_true(BN_mod_exp(r, a, zero, BN_value_one(), NULL))
                 ^
1913.               || !TEST_BN_eq_zero(r)
1914.               || !TEST_true(BN_mod_exp_mont(r, a, zero, BN_value_one(),

crypto/bn/bn_lib.c:82:5: Assignment
  80.   const BIGNUM *BN_value_one(void)
  81.   {
  82.       static const BN_ULONG data_one = 1L;
            ^
  83.       static const BIGNUM const_one =
  84.           { (BN_ULONG *)&data_one, 1, 1, 0, BN_FLG_STATIC_DATA };

test/bntest.c:1912:10: Call
1910.       BN_zero(zero);
1911.   
1912.       if (!TEST_true(BN_mod_exp(r, a, zero, BN_value_one(), NULL))
                 ^
1913.               || !TEST_BN_eq_zero(r)
1914.               || !TEST_true(BN_mod_exp_mont(r, a, zero, BN_value_one(),

crypto/bn/bn_exp.c:89:1: Parameter `*m->d`
  87.   }
  88.   
  89. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  90.                  BN_CTX *ctx)
  91.   {

crypto/bn/bn_exp.c:134:9: Call
  132.   
  133.   #ifdef MONT_MUL_MOD
  134.       if (BN_is_odd(m)) {
                 ^
  135.   # ifdef MONT_EXP_WORD
  136.           if (a->top == 1 && !a->neg

crypto/bn/bn_lib.c:870:1: Parameter `*a->d`
    868.   }
    869.   
    870. > int BN_is_odd(const BIGNUM *a)
    871.   {
    872.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_exp.c:144:19: Call
  142.           } else
  143.   # endif
  144.               ret = BN_mod_exp_mont(r, a, p, m, ctx, NULL);
                           ^
  145.       } else
  146.   #endif

crypto/bn/bn_exp.c:296:1: Parameter `*m->d`
    294.   }
    295.   
    296. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
    297.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    298.   {

crypto/bn/bn_exp.c:310:16: Call
    308.               || BN_get_flags(a, BN_FLG_CONSTTIME) != 0
    309.               || BN_get_flags(m, BN_FLG_CONSTTIME) != 0) {
    310.           return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
                          ^
    311.       }
    312.   

crypto/bn/bn_exp.c:598:1: <RHS trace>
596.    * http://www.daemonology.net/hyperthreading-considered-harmful/)
597.    */
598. > int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
599.                                 const BIGNUM *m, BN_CTX *ctx,
600.                                 BN_MONT_CTX *in_mont)

crypto/bn/bn_exp.c:598:1: Parameter `*m->d`
      596.    * http://www.daemonology.net/hyperthreading-considered-harmful/)
      597.    */
      598. > int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
      599.                                 const BIGNUM *m, BN_CTX *ctx,
      600.                                 BN_MONT_CTX *in_mont)

crypto/bn/bn_exp.c:619:10: Call
      617.       bn_check_top(m);
      618.   
      619.       if (!BN_is_odd(m)) {
                      ^
      620.           BNerr(BN_F_BN_MOD_EXP_MONT_CONSTTIME, BN_R_CALLED_WITH_EVEN_MODULUS);
      621.           return (0);

crypto/bn/bn_lib.c:870:1: Parameter `*a->d`
        868.   }
        869.   
        870. > int BN_is_odd(const BIGNUM *a)
        871.   {
        872.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_exp.c:740:9: Binary operation: (0 - 1):unsigned64 by call to `BN_mod_exp` 
      738.       if (m->d[top - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) {
      739.           /* 2^(top*BN_BITS2) - m */
      740.           tmp.d[0] = (0 - m->d[0]) & BN_MASK2;
                     ^
      741.           for (i = 1; i < top; i++)
      742.               tmp.d[i] = (~m->d[i]) & BN_MASK2;
