crypto/modes/gcm128.c:871: error: INTEGER_OVERFLOW_L2
  (0 - [0, 1]):unsigned64 by call to `gcm_init_4bit`.
Showing all 5 steps of the trace


crypto/modes/gcm128.c:871:9: Call
869.           ctx->ghash = gcm_ghash_p8;
870.       } else {
871.           gcm_init_4bit(ctx->Htable, ctx->H.u);
               ^
872.           ctx->gmult = gcm_gmult_4bit;
873.           ctx->ghash = gcm_ghash_4bit;

crypto/modes/gcm128.c:265:1: <RHS trace>
263.   #elif   TABLE_BITS==4
264.   
265. > static void gcm_init_4bit(u128 Htable[16], u64 H[2])
266.   {
267.       u128 V;

crypto/modes/gcm128.c:265:1: Parameter `*H`
  263.   #elif   TABLE_BITS==4
  264.   
  265. > static void gcm_init_4bit(u128 Htable[16], u64 H[2])
  266.   {
  267.       u128 V;

crypto/modes/gcm128.c:275:5: Assignment
  273.       Htable[0].lo = 0;
  274.       V.hi = H[0];
  275.       V.lo = H[1];
             ^
  276.   
  277.   # if defined(OPENSSL_SMALL_FOOTPRINT)

crypto/modes/gcm128.c:293:5: Binary operation: (0 - [0, 1]):unsigned64 by call to `gcm_init_4bit` 
  291.   # else
  292.       Htable[8] = V;
  293.       REDUCE1BIT(V);
             ^
  294.       Htable[4] = V;
  295.       REDUCE1BIT(V);

static void gcm_init_4bit(u128 Htable[16], u64 H[2])
{
    u128 V;
# if defined(OPENSSL_SMALL_FOOTPRINT)
    int i;
# endif
    Htable[0].hi = 0;
    Htable[0].lo = 0;
    V.hi = H[0];
    V.lo = H[1];
# if defined(OPENSSL_SMALL_FOOTPRINT)
    for (Htable[8] = V, i = 4; i > 0; i >>= 1) {
        REDUCE1BIT(V);
        Htable[i] = V;
    }
    for (i = 2; i < 16; i <<= 1) {
        u128 *Hi = Htable + i;
        int j;
        for (V = *Hi, j = 1; j < i; ++j) {
            Hi[j].hi = V.hi ^ Htable[j].hi;
            Hi[j].lo = V.lo ^ Htable[j].lo;
        }
    }
# else
    Htable[8] = V;
    REDUCE1BIT(V);
    Htable[4] = V;
    REDUCE1BIT(V);
    Htable[2] = V;
    REDUCE1BIT(V);
    Htable[1] = V;
    Htable[3].hi = V.hi ^ Htable[2].hi, Htable[3].lo = V.lo ^ Htable[2].lo;
    V = Htable[4];
    Htable[5].hi = V.hi ^ Htable[1].hi, Htable[5].lo = V.lo ^ Htable[1].lo;
    Htable[6].hi = V.hi ^ Htable[2].hi, Htable[6].lo = V.lo ^ Htable[2].lo;
    Htable[7].hi = V.hi ^ Htable[3].hi, Htable[7].lo = V.lo ^ Htable[3].lo;
    V = Htable[8];
    Htable[9].hi = V.hi ^ Htable[1].hi, Htable[9].lo = V.lo ^ Htable[1].lo;
    Htable[10].hi = V.hi ^ Htable[2].hi, Htable[10].lo = V.lo ^ Htable[2].lo;
    Htable[11].hi = V.hi ^ Htable[3].hi, Htable[11].lo = V.lo ^ Htable[3].lo;
    Htable[12].hi = V.hi ^ Htable[4].hi, Htable[12].lo = V.lo ^ Htable[4].lo;
    Htable[13].hi = V.hi ^ Htable[5].hi, Htable[13].lo = V.lo ^ Htable[5].lo;
    Htable[14].hi = V.hi ^ Htable[6].hi, Htable[14].lo = V.lo ^ Htable[6].lo;
    Htable[15].hi = V.hi ^ Htable[7].hi, Htable[15].lo = V.lo ^ Htable[7].lo;
# endif
# if defined(GHASH_ASM) && (defined(__arm__) || defined(__arm))
    {
        int j;
        const union {
            long one;
            char little;
        } is_endian = {
            1
        };
        if (is_endian.little)
            for (j = 0; j < 16; ++j) {
                V = Htable[j];
                Htable[j].hi = V.lo;
                Htable[j].lo = V.hi;
        } else
            for (j = 0; j < 16; ++j) {
                V = Htable[j];
                Htable[j].hi = V.lo << 32 | V.lo >> 32;
                Htable[j].lo = V.hi << 32 | V.hi >> 32;
            }
    }
# endif
}
['void CRYPTO_gcm128_init(GCM128_CONTEXT *ctx, void *key, block128_f block)\n{\n    const union {\n        long one;\n        char little;\n    } is_endian = {\n        1\n    };\n    memset(ctx, 0, sizeof(*ctx));\n    ctx->block = block;\n    ctx->key = key;\n    (*block) (ctx->H.c, ctx->H.c, key);\n    if (is_endian.little) {\n#ifdef BSWAP8\n        ctx->H.u[0] = BSWAP8(ctx->H.u[0]);\n        ctx->H.u[1] = BSWAP8(ctx->H.u[1]);\n#else\n        u8 *p = ctx->H.c;\n        u64 hi, lo;\n        hi = (u64)GETU32(p) << 32 | GETU32(p + 4);\n        lo = (u64)GETU32(p + 8) << 32 | GETU32(p + 12);\n        ctx->H.u[0] = hi;\n        ctx->H.u[1] = lo;\n#endif\n    }\n#if     TABLE_BITS==8\n    gcm_init_8bit(ctx->Htable, ctx->H.u);\n#elif   TABLE_BITS==4\n# if    defined(GHASH_ASM_X86_OR_64)\n#  if   !defined(GHASH_ASM_X86) || defined(OPENSSL_IA32_SSE2)\n    if (OPENSSL_ia32cap_P[0] & (1 << 24) &&\n        OPENSSL_ia32cap_P[1] & (1 << 1)) {\n        if (((OPENSSL_ia32cap_P[1] >> 22) & 0x41) == 0x41) {\n            gcm_init_avx(ctx->Htable, ctx->H.u);\n            ctx->gmult = gcm_gmult_avx;\n            ctx->ghash = gcm_ghash_avx;\n        } else {\n            gcm_init_clmul(ctx->Htable, ctx->H.u);\n            ctx->gmult = gcm_gmult_clmul;\n            ctx->ghash = gcm_ghash_clmul;\n        }\n        return;\n    }\n#  endif\n    gcm_init_4bit(ctx->Htable, ctx->H.u);\n#  if   defined(GHASH_ASM_X86)\n#   if  defined(OPENSSL_IA32_SSE2)\n    if (OPENSSL_ia32cap_P[0] & (1 << 25)) {\n#   else\n    if (OPENSSL_ia32cap_P[0] & (1 << 23)) {\n#   endif\n        ctx->gmult = gcm_gmult_4bit_mmx;\n        ctx->ghash = gcm_ghash_4bit_mmx;\n    } else {\n        ctx->gmult = gcm_gmult_4bit_x86;\n        ctx->ghash = gcm_ghash_4bit_x86;\n    }\n#  else\n    ctx->gmult = gcm_gmult_4bit;\n    ctx->ghash = gcm_ghash_4bit;\n#  endif\n# elif  defined(GHASH_ASM_ARM)\n#  ifdef PMULL_CAPABLE\n    if (PMULL_CAPABLE) {\n        gcm_init_v8(ctx->Htable, ctx->H.u);\n        ctx->gmult = gcm_gmult_v8;\n        ctx->ghash = gcm_ghash_v8;\n    } else\n#  endif\n#  ifdef NEON_CAPABLE\n    if (NEON_CAPABLE) {\n        gcm_init_neon(ctx->Htable, ctx->H.u);\n        ctx->gmult = gcm_gmult_neon;\n        ctx->ghash = gcm_ghash_neon;\n    } else\n#  endif\n    {\n        gcm_init_4bit(ctx->Htable, ctx->H.u);\n        ctx->gmult = gcm_gmult_4bit;\n        ctx->ghash = gcm_ghash_4bit;\n    }\n# elif  defined(GHASH_ASM_SPARC)\n    if (OPENSSL_sparcv9cap_P[0] & SPARCV9_VIS3) {\n        gcm_init_vis3(ctx->Htable, ctx->H.u);\n        ctx->gmult = gcm_gmult_vis3;\n        ctx->ghash = gcm_ghash_vis3;\n    } else {\n        gcm_init_4bit(ctx->Htable, ctx->H.u);\n        ctx->gmult = gcm_gmult_4bit;\n        ctx->ghash = gcm_ghash_4bit;\n    }\n# elif  defined(GHASH_ASM_PPC)\n    if (OPENSSL_ppccap_P & PPC_CRYPTO207) {\n        gcm_init_p8(ctx->Htable, ctx->H.u);\n        ctx->gmult = gcm_gmult_p8;\n        ctx->ghash = gcm_ghash_p8;\n    } else {\n        gcm_init_4bit(ctx->Htable, ctx->H.u);\n        ctx->gmult = gcm_gmult_4bit;\n        ctx->ghash = gcm_ghash_4bit;\n    }\n# else\n    gcm_init_4bit(ctx->Htable, ctx->H.u);\n# endif\n#endif\n}', 'static void gcm_init_4bit(u128 Htable[16], u64 H[2])\n{\n    u128 V;\n# if defined(OPENSSL_SMALL_FOOTPRINT)\n    int i;\n# endif\n    Htable[0].hi = 0;\n    Htable[0].lo = 0;\n    V.hi = H[0];\n    V.lo = H[1];\n# if defined(OPENSSL_SMALL_FOOTPRINT)\n    for (Htable[8] = V, i = 4; i > 0; i >>= 1) {\n        REDUCE1BIT(V);\n        Htable[i] = V;\n    }\n    for (i = 2; i < 16; i <<= 1) {\n        u128 *Hi = Htable + i;\n        int j;\n        for (V = *Hi, j = 1; j < i; ++j) {\n            Hi[j].hi = V.hi ^ Htable[j].hi;\n            Hi[j].lo = V.lo ^ Htable[j].lo;\n        }\n    }\n# else\n    Htable[8] = V;\n    REDUCE1BIT(V);\n    Htable[4] = V;\n    REDUCE1BIT(V);\n    Htable[2] = V;\n    REDUCE1BIT(V);\n    Htable[1] = V;\n    Htable[3].hi = V.hi ^ Htable[2].hi, Htable[3].lo = V.lo ^ Htable[2].lo;\n    V = Htable[4];\n    Htable[5].hi = V.hi ^ Htable[1].hi, Htable[5].lo = V.lo ^ Htable[1].lo;\n    Htable[6].hi = V.hi ^ Htable[2].hi, Htable[6].lo = V.lo ^ Htable[2].lo;\n    Htable[7].hi = V.hi ^ Htable[3].hi, Htable[7].lo = V.lo ^ Htable[3].lo;\n    V = Htable[8];\n    Htable[9].hi = V.hi ^ Htable[1].hi, Htable[9].lo = V.lo ^ Htable[1].lo;\n    Htable[10].hi = V.hi ^ Htable[2].hi, Htable[10].lo = V.lo ^ Htable[2].lo;\n    Htable[11].hi = V.hi ^ Htable[3].hi, Htable[11].lo = V.lo ^ Htable[3].lo;\n    Htable[12].hi = V.hi ^ Htable[4].hi, Htable[12].lo = V.lo ^ Htable[4].lo;\n    Htable[13].hi = V.hi ^ Htable[5].hi, Htable[13].lo = V.lo ^ Htable[5].lo;\n    Htable[14].hi = V.hi ^ Htable[6].hi, Htable[14].lo = V.lo ^ Htable[6].lo;\n    Htable[15].hi = V.hi ^ Htable[7].hi, Htable[15].lo = V.lo ^ Htable[7].lo;\n# endif\n# if defined(GHASH_ASM) && (defined(__arm__) || defined(__arm))\n    {\n        int j;\n        const union {\n            long one;\n            char little;\n        } is_endian = {\n            1\n        };\n        if (is_endian.little)\n            for (j = 0; j < 16; ++j) {\n                V = Htable[j];\n                Htable[j].hi = V.lo;\n                Htable[j].lo = V.hi;\n        } else\n            for (j = 0; j < 16; ++j) {\n                V = Htable[j];\n                Htable[j].hi = V.lo << 32 | V.lo >> 32;\n                Htable[j].lo = V.hi << 32 | V.hi >> 32;\n            }\n    }\n# endif\n}']