test/sslapitest.c:3213: error: INTEGER_OVERFLOW_L2
  ([0, 8] - 1):unsigned32 by call to `SSL_free`.
Showing all 18 steps of the trace


test/sslapitest.c:3176:11: Call
3174.       BIO *rbio, *wbio;
3175.   
3176.       ctx = SSL_CTX_new(TLS_method());
                  ^
3177.       if (!TEST_ptr(ctx))
3178.           goto end;

ssl/ssl_lib.c:2812:21: Call
  2810.           goto err;
  2811.   
  2812.       ret->sessions = lh_SSL_SESSION_new(ssl_session_hash, ssl_session_cmp);
                              ^
  2813.       if (ret->sessions == NULL)
  2814.           goto err;

ssl/ssl_locl.h:713:1: Call
    711.   } TLSEXT_INDEX;
    712.   
    713. > DEFINE_LHASH_OF(SSL_SESSION);
    714.   /* Needed in ssl_cert.c */
    715.   DEFINE_LHASH_OF(X509_NAME);

crypto/lhash/lhash.c:54:5: Assignment
      52.       ret->comp = ((c == NULL) ? (OPENSSL_LH_COMPFUNC)strcmp : c);
      53.       ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h);
      54.       ret->num_nodes = MIN_NODES / 2;
                ^
      55.       ret->num_alloc_nodes = MIN_NODES;
      56.       ret->pmax = MIN_NODES / 2;

test/sslapitest.c:3213:5: Call
3211.   
3212.   end:
3213.       SSL_free(con);
            ^
3214.       SSL_CTX_free(ctx);
3215.   

ssl/ssl_lib.c:1074:1: Parameter `s->ctx->sessions->num_nodes`
  1072.   }
  1073.   
  1074. > void SSL_free(SSL *s)
  1075.   {
  1076.       int i;

ssl/ssl_lib.c:1144:5: Call
  1142.       RECORD_LAYER_release(&s->rlayer);
  1143.   
  1144.       SSL_CTX_free(s->ctx);
              ^
  1145.   
  1146.       ASYNC_WAIT_CTX_free(s->waitctx);

ssl/ssl_lib.c:2929:1: Parameter `a->sessions->num_nodes`
    2927.   }
    2928.   
    2929. > void SSL_CTX_free(SSL_CTX *a)
    2930.   {
    2931.       int i;

ssl/ssl_lib.c:2955:9: Call
    2953.        */
    2954.       if (a->sessions != NULL)
    2955.           SSL_CTX_flush_sessions(a, 0);
                    ^
    2956.   
    2957.       CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);

ssl/ssl_sess.c:1094:1: Parameter `s->sessions->num_nodes`
      1092.   IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
      1093.   
      1094. > void SSL_CTX_flush_sessions(SSL_CTX *s, long t)
      1095.   {
      1096.       unsigned long i;

ssl/ssl_sess.c:1107:5: Call
      1105.       i = lh_SSL_SESSION_get_down_load(s->sessions);
      1106.       lh_SSL_SESSION_set_down_load(s->sessions, 0);
      1107.       lh_SSL_SESSION_doall_TIMEOUT_PARAM(tp.cache, timeout_cb, &tp);
                  ^
      1108.       lh_SSL_SESSION_set_down_load(s->sessions, i);
      1109.       CRYPTO_THREAD_unlock(s->lock);

ssl/ssl_sess.c:1092:1: Parameter `lh->num_nodes`
        1090.   }
        1091.   
        1092. > IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
        1093.   
        1094.   void SSL_CTX_flush_sessions(SSL_CTX *s, long t)

ssl/ssl_sess.c:1092:1: Call
        1090.   }
        1091.   
        1092. > IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
        1093.   
        1094.   void SSL_CTX_flush_sessions(SSL_CTX *s, long t)

crypto/lhash/lhash.c:198:1: Parameter `lh->num_nodes`
          196.   }
          197.   
          198. > void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg)
          199.   {
          200.       doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC)0, func, arg);

crypto/lhash/lhash.c:200:5: Call
          198.   void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg)
          199.   {
          200.       doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC)0, func, arg);
                     ^
          201.   }
          202.   

crypto/lhash/lhash.c:166:1: <LHS trace>
164.   }
165.   
166. > static void doall_util_fn(OPENSSL_LHASH *lh, int use_arg,
167.                             OPENSSL_LH_DOALL_FUNC func,
168.                             OPENSSL_LH_DOALL_FUNCARG func_arg, void *arg)

crypto/lhash/lhash.c:166:1: Parameter `lh->num_nodes`
            164.   }
            165.   
            166. > static void doall_util_fn(OPENSSL_LHASH *lh, int use_arg,
            167.                             OPENSSL_LH_DOALL_FUNC func,
            168.                             OPENSSL_LH_DOALL_FUNCARG func_arg, void *arg)

crypto/lhash/lhash.c:180:10: Binary operation: ([0, 8] - 1):unsigned32 by call to `SSL_free` 
            178.        * memory leaks otherwise
            179.        */
            180.       for (i = lh->num_nodes - 1; i >= 0; i--) {
                            ^
            181.           a = lh->b[i];
            182.           while (a != NULL) {
