test/bntest.c:1912: error: INTEGER_OVERFLOW_L2
  (0 - [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:859:1: Parameter `*a->d`
    857.   }
    858.   
    859. > int BN_is_odd(const BIGNUM *a)
    860.   {
    861.       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: <RHS trace>
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: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:317:10: Call
    315.       bn_check_top(m);
    316.   
    317.       if (!BN_is_odd(m)) {
                    ^
    318.           BNerr(BN_F_BN_MOD_EXP_MONT, BN_R_CALLED_WITH_EVEN_MODULUS);
    319.           return 0;

crypto/bn/bn_lib.c:859:1: Parameter `*a->d`
      857.   }
      858.   
      859. > int BN_is_odd(const BIGNUM *a)
      860.   {
      861.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_exp.c:353:19: Call
    351.       }
    352.   
    353.       if (a->neg || BN_ucmp(a, m) >= 0) {
                             ^
    354.           if (!BN_nnmod(val[0], a, m, ctx))
    355.               goto err;

crypto/bn/bn_lib.c:547:1: Parameter `*b->d`
      545.   }
      546.   
      547. > int BN_ucmp(const BIGNUM *a, const BIGNUM *b)
      548.   {
      549.       int i;

crypto/bn/bn_exp.c:392:9: Binary operation: (0 - [0, 1]):unsigned64 by call to `BN_mod_exp` 
    390.               goto err;
    391.           /* 2^(top*BN_BITS2) - m */
    392.           r->d[0] = (0 - m->d[0]) & BN_MASK2;
                   ^
    393.           for (i = 1; i < j; i++)
    394.               r->d[i] = (~m->d[i]) & BN_MASK2;
