crypto/ec/ec_lib.c:480: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `BN_CTX_end`.
Showing all 9 steps of the trace


crypto/ec/ec_lib.c:452:1: Parameter `ctx->stack.depth`
450.   }
451.   
452. > int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx)
453.   {
454.       int r = 0;

crypto/ec/ec_lib.c:472:5: Call
470.           return -1;
471.   
472.       BN_CTX_start(ctx);
           ^
473.       a1 = BN_CTX_get(ctx);
474.       a2 = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:236:1: Parameter `ctx->stack.depth`
  234.   }
  235.   
  236. > void BN_CTX_start(BN_CTX *ctx)
  237.   {
  238.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/ec/ec_lib.c:480:9: Call
478.       b3 = BN_CTX_get(ctx);
479.       if (b3 == NULL) {
480.           BN_CTX_end(ctx);
               ^
481.           BN_CTX_free(ctx_new);
482.           return -1;

crypto/bn/bn_ctx.c:250:1: Parameter `ctx->stack.depth`
  248.   }
  249.   
  250. > void BN_CTX_end(BN_CTX *ctx)
  251.   {
  252.       CTXDBG_ENTRY("BN_CTX_end", ctx);

crypto/bn/bn_ctx.c:256:27: Call
  254.           ctx->err_stack--;
  255.       else {
  256.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                   ^
  257.           /* Does this stack frame have anything to release? */
  258.           if (fp < ctx->used)

crypto/bn/bn_ctx.c:326:1: <LHS trace>
324.   }
325.   
326. > static unsigned int BN_STACK_pop(BN_STACK *st)
327.   {
328.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:326:1: Parameter `st->depth`
    324.   }
    325.   
    326. > static unsigned int BN_STACK_pop(BN_STACK *st)
    327.   {
    328.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:328:12: Binary operation: ([0, +oo] - 1):unsigned32 by call to `BN_CTX_end` 
    326.   static unsigned int BN_STACK_pop(BN_STACK *st)
    327.   {
    328.       return st->indexes[--(st->depth)];
                      ^
    329.   }
    330.   

static unsigned int BN_STACK_pop(BN_STACK *st)
{
    return st->indexes[--(st->depth)];
}
['int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx)\n{\n    int r = 0;\n    BIGNUM *a1, *a2, *a3, *b1, *b2, *b3;\n    BN_CTX *ctx_new = NULL;\n    if (EC_METHOD_get_field_type(EC_GROUP_method_of(a)) !=\n        EC_METHOD_get_field_type(EC_GROUP_method_of(b)))\n        return 1;\n    if (EC_GROUP_get_curve_name(a) && EC_GROUP_get_curve_name(b) &&\n        EC_GROUP_get_curve_name(a) != EC_GROUP_get_curve_name(b))\n        return 1;\n    if (ctx == NULL)\n        ctx_new = ctx = BN_CTX_new();\n    if (ctx == NULL)\n        return -1;\n    BN_CTX_start(ctx);\n    a1 = BN_CTX_get(ctx);\n    a2 = BN_CTX_get(ctx);\n    a3 = BN_CTX_get(ctx);\n    b1 = BN_CTX_get(ctx);\n    b2 = BN_CTX_get(ctx);\n    b3 = BN_CTX_get(ctx);\n    if (b3 == NULL) {\n        BN_CTX_end(ctx);\n        BN_CTX_free(ctx_new);\n        return -1;\n    }\n    if (!a->meth->group_get_curve(a, a1, a2, a3, ctx) ||\n        !b->meth->group_get_curve(b, b1, b2, b3, ctx))\n        r = 1;\n    if (r || BN_cmp(a1, b1) || BN_cmp(a2, b2) || BN_cmp(a3, b3))\n        r = 1;\n    if (r || EC_POINT_cmp(a, EC_GROUP_get0_generator(a),\n                          EC_GROUP_get0_generator(b), ctx))\n        r = 1;\n    if (!r) {\n        if (!EC_GROUP_get_order(a, a1, ctx) ||\n            !EC_GROUP_get_order(b, b1, ctx) ||\n            !EC_GROUP_get_cofactor(a, a2, ctx) ||\n            !EC_GROUP_get_cofactor(b, b2, ctx)) {\n            BN_CTX_end(ctx);\n            BN_CTX_free(ctx_new);\n            return -1;\n        }\n        if (BN_cmp(a1, b1) || BN_cmp(a2, b2))\n            r = 1;\n    }\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx_new);\n    return r;\n}', 'void BN_CTX_start(BN_CTX *ctx)\n{\n    CTXDBG_ENTRY("BN_CTX_start", ctx);\n    if (ctx->err_stack || ctx->too_many)\n        ctx->err_stack++;\n    else if (!BN_STACK_push(&ctx->stack, ctx->used)) {\n        BNerr(BN_F_BN_CTX_START, BN_R_TOO_MANY_TEMPORARY_VARIABLES);\n        ctx->err_stack++;\n    }\n    CTXDBG_EXIT(ctx);\n}', 'void BN_CTX_end(BN_CTX *ctx)\n{\n    CTXDBG_ENTRY("BN_CTX_end", ctx);\n    if (ctx->err_stack)\n        ctx->err_stack--;\n    else {\n        unsigned int fp = BN_STACK_pop(&ctx->stack);\n        if (fp < ctx->used)\n            BN_POOL_release(&ctx->pool, ctx->used - fp);\n        ctx->used = fp;\n        ctx->too_many = 0;\n    }\n    CTXDBG_EXIT(ctx);\n}', 'static unsigned int BN_STACK_pop(BN_STACK *st)\n{\n    return st->indexes[--(st->depth)];\n}']