crypto/bn/bn_prime.c:373: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `BN_MONT_CTX_set`.
Showing all 47 steps of the trace


crypto/bn/bn_prime.c:302:1: Parameter `ctx_passed->pool.used`
300.   }
301.   
302. > int BN_is_prime_fasttest_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
303.                               int do_trial_division, BN_GENCB *cb)
304.   {

crypto/bn/bn_prime.c:346:10: Call
344.       } else
345.           A = a;
346.       A1 = BN_CTX_get(ctx);
                ^
347.       A1_odd = BN_CTX_get(ctx);
348.       check = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
  282.   }
  283.   
  284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
  285.   {
  286.       BIGNUM *ret;

crypto/bn/bn_prime.c:347:14: Call
345.           A = a;
346.       A1 = BN_CTX_get(ctx);
347.       A1_odd = BN_CTX_get(ctx);
                    ^
348.       check = BN_CTX_get(ctx);
349.       if (check == NULL)

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
  282.   }
  283.   
  284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
  285.   {
  286.       BIGNUM *ret;

crypto/bn/bn_prime.c:348:13: Call
346.       A1 = BN_CTX_get(ctx);
347.       A1_odd = BN_CTX_get(ctx);
348.       check = BN_CTX_get(ctx);
                   ^
349.       if (check == NULL)
350.           goto err;

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
  282.   }
  283.   
  284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
  285.   {
  286.       BIGNUM *ret;

crypto/bn/bn_prime.c:373:10: Call
371.       if (mont == NULL)
372.           goto err;
373.       if (!BN_MONT_CTX_set(mont, A, ctx))
                ^
374.           goto err;
375.   

crypto/bn/bn_mont.c:347:1: Parameter `ctx->pool.used`
  345.   }
  346.   
  347. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
  348.   {
  349.       int ret = 0;

crypto/bn/bn_mont.c:353:15: Call
  351.   
  352.       BN_CTX_start(ctx);
  353.       if ((Ri = BN_CTX_get(ctx)) == NULL)
                       ^
  354.           goto err;
  355.       R = &(mont->RR);            /* grab RR as a temp */

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
    282.   }
    283.   
    284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
    285.   {
    286.       BIGNUM *ret;

crypto/bn/bn_mont.c:423:14: Call
  421.           tmod.top = buf[0] != 0 ? 1 : 0;
  422.           /* Ri = R^-1 mod N */
  423.           if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
                      ^
  424.               goto err;
  425.           if (!BN_lshift(Ri, Ri, BN_BITS2))

crypto/bn/bn_gcd.c:226:1: Parameter `ctx->pool.used`
    224.                                           BN_CTX *ctx);
    225.   
    226. > BIGNUM *BN_mod_inverse(BIGNUM *in,
    227.                          const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
    228.   {

crypto/bn/bn_gcd.c:231:10: Call
    229.       BIGNUM *rv;
    230.       int noinv;
    231.       rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
                    ^
    232.       if (noinv)
    233.           BNerr(BN_F_BN_MOD_INVERSE, BN_R_NO_INVERSE);

crypto/bn/bn_gcd.c:237:1: Parameter `ctx->pool.used`
      235.   }
      236.   
      237. > BIGNUM *int_bn_mod_inverse(BIGNUM *in,
      238.                              const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx,
      239.                              int *pnoinv)

crypto/bn/bn_gcd.c:250:16: Call
      248.       if ((BN_get_flags(a, BN_FLG_CONSTTIME) != 0)
      249.           || (BN_get_flags(n, BN_FLG_CONSTTIME) != 0)) {
      250.           return BN_mod_inverse_no_branch(in, a, n, ctx);
                            ^
      251.       }
      252.   

crypto/bn/bn_gcd.c:557:1: Parameter `ctx->pool.used`
        555.    * not contain branches that may leak sensitive information.
        556.    */
        557. > static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
        558.                                           const BIGNUM *a, const BIGNUM *n,
        559.                                           BN_CTX *ctx)

crypto/bn/bn_gcd.c:571:9: Call
        569.   
        570.       BN_CTX_start(ctx);
        571.       A = BN_CTX_get(ctx);
                       ^
        572.       B = BN_CTX_get(ctx);
        573.       X = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
          282.   }
          283.   
          284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          285.   {
          286.       BIGNUM *ret;

crypto/bn/bn_gcd.c:572:9: Call
        570.       BN_CTX_start(ctx);
        571.       A = BN_CTX_get(ctx);
        572.       B = BN_CTX_get(ctx);
                       ^
        573.       X = BN_CTX_get(ctx);
        574.       D = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
          282.   }
          283.   
          284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          285.   {
          286.       BIGNUM *ret;

crypto/bn/bn_gcd.c:573:9: Call
        571.       A = BN_CTX_get(ctx);
        572.       B = BN_CTX_get(ctx);
        573.       X = BN_CTX_get(ctx);
                       ^
        574.       D = BN_CTX_get(ctx);
        575.       M = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
          282.   }
          283.   
          284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          285.   {
          286.       BIGNUM *ret;

crypto/bn/bn_gcd.c:574:9: Call
        572.       B = BN_CTX_get(ctx);
        573.       X = BN_CTX_get(ctx);
        574.       D = BN_CTX_get(ctx);
                       ^
        575.       M = BN_CTX_get(ctx);
        576.       Y = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
          282.   }
          283.   
          284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          285.   {
          286.       BIGNUM *ret;

crypto/bn/bn_gcd.c:575:9: Call
        573.       X = BN_CTX_get(ctx);
        574.       D = BN_CTX_get(ctx);
        575.       M = BN_CTX_get(ctx);
                       ^
        576.       Y = BN_CTX_get(ctx);
        577.       T = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
          282.   }
          283.   
          284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          285.   {
          286.       BIGNUM *ret;

crypto/bn/bn_gcd.c:576:9: Call
        574.       D = BN_CTX_get(ctx);
        575.       M = BN_CTX_get(ctx);
        576.       Y = BN_CTX_get(ctx);
                       ^
        577.       T = BN_CTX_get(ctx);
        578.       if (T == NULL)

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
          282.   }
          283.   
          284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          285.   {
          286.       BIGNUM *ret;

crypto/bn/bn_gcd.c:577:9: Call
        575.       M = BN_CTX_get(ctx);
        576.       Y = BN_CTX_get(ctx);
        577.       T = BN_CTX_get(ctx);
                       ^
        578.       if (T == NULL)
        579.           goto err;

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
          282.   }
          283.   
          284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          285.   {
          286.       BIGNUM *ret;

crypto/bn/bn_gcd.c:603:14: Call
        601.           pB = &local_B;
        602.           BN_with_flags(pB, B, BN_FLG_CONSTTIME);
        603.           if (!BN_nnmod(B, pB, A, ctx))
                            ^
        604.               goto err;
        605.       }

crypto/bn/bn_mod.c:119:1: Parameter `ctx->pool.used`
          117.   #include "bn_lcl.h"
          118.   
          119. > int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
          120.   {
          121.       /*

crypto/bn/bn_mod.c:126:11: Call
          124.        */
          125.   
          126.       if (!(BN_mod(r, m, d, ctx)))
                           ^
          127.           return 0;
          128.       if (!r->neg)

crypto/bn/bn_div.c:189:1: Parameter `ctx->pool.used`
            187.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
            188.    */
            189. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
            190.              BN_CTX *ctx)
            191.   {

crypto/bn/bn_div.c:243:11: Call
            241.   
            242.       BN_CTX_start(ctx);
            243.       tmp = BN_CTX_get(ctx);
                             ^
            244.       snum = BN_CTX_get(ctx);
            245.       sdiv = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
              282.   }
              283.   
              284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
              285.   {
              286.       BIGNUM *ret;

crypto/bn/bn_div.c:244:12: Call
            242.       BN_CTX_start(ctx);
            243.       tmp = BN_CTX_get(ctx);
            244.       snum = BN_CTX_get(ctx);
                              ^
            245.       sdiv = BN_CTX_get(ctx);
            246.       if (dv == NULL)

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
              282.   }
              283.   
              284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
              285.   {
              286.       BIGNUM *ret;

crypto/bn/bn_div.c:245:12: Call
            243.       tmp = BN_CTX_get(ctx);
            244.       snum = BN_CTX_get(ctx);
            245.       sdiv = BN_CTX_get(ctx);
                              ^
            246.       if (dv == NULL)
            247.           res = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:284:1: Parameter `ctx->pool.used`
              282.   }
              283.   
              284. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
              285.   {
              286.       BIGNUM *ret;

crypto/bn/bn_div.c:469:5: Call
            467.       if (no_branch)
            468.           bn_correct_top(res);
            469.       BN_CTX_end(ctx);
                       ^
            470.       return (1);
            471.    err:

crypto/bn/bn_ctx.c:267:1: Parameter `ctx->pool.used`
              265.   }
              266.   
              267. > void BN_CTX_end(BN_CTX *ctx)
              268.   {
              269.       CTXDBG_ENTRY("BN_CTX_end", ctx);

crypto/bn/bn_ctx.c:276:13: Call
              274.           /* Does this stack frame have anything to release? */
              275.           if (fp < ctx->used)
              276.               BN_POOL_release(&ctx->pool, ctx->used - fp);
                                 ^
              277.           ctx->used = fp;
              278.           /* Unjam "too_many" in case "get" had failed */

crypto/bn/bn_ctx.c:435:1: <LHS trace>
433.   }
434.   
435. > static void BN_POOL_release(BN_POOL *p, unsigned int num)
436.   {
437.       unsigned int offset = (p->used - 1) % BN_CTX_POOL_SIZE;

crypto/bn/bn_ctx.c:435:1: Parameter `p->used`
                433.   }
                434.   
                435. > static void BN_POOL_release(BN_POOL *p, unsigned int num)
                436.   {
                437.       unsigned int offset = (p->used - 1) % BN_CTX_POOL_SIZE;

crypto/bn/bn_ctx.c:437:5: Binary operation: ([0, +oo] - 1):unsigned32 by call to `BN_MONT_CTX_set` 
                435.   static void BN_POOL_release(BN_POOL *p, unsigned int num)
                436.   {
                437.       unsigned int offset = (p->used - 1) % BN_CTX_POOL_SIZE;
                           ^
                438.       p->used -= num;
                439.       while (num--) {
