test/handshake_helper.c:1352: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `SSL_set_session`.
Showing all 23 steps of the trace


test/handshake_helper.c:1340:10: Call
1338.           goto err;
1339.       }
1340.       if (!create_peer(&client, client_ctx)) {
                 ^
1341.           TEST_note("creating client context");
1342.           goto err;

test/handshake_helper.c:695:10: Call
  693.       unsigned char *read_buf = NULL, *write_buf = NULL;
  694.   
  695.       if (!TEST_ptr(ssl = SSL_new(ctx))
                  ^
  696.               || !TEST_ptr(write_buf = OPENSSL_zalloc(peer_buffer_size))
  697.               || !TEST_ptr(read_buf = OPENSSL_zalloc(peer_buffer_size)))

ssl/ssl_lib.c:610:1: Parameter `ctx->sessions->num_items`
    608.   }
    609.   
    610. > SSL *SSL_new(SSL_CTX *ctx)
    611.   {
    612.       SSL *s;

test/handshake_helper.c:1351:14: Call
1349.       if (session_in != NULL) {
1350.           /* In case we're testing resumption without tickets. */
1351.           if (!TEST_true(SSL_CTX_add_session(server_ctx, session_in))
                     ^
1352.                   || !TEST_true(SSL_set_session(client.ssl, session_in)))
1353.               goto err;

ssl/ssl_sess.c:647:1: Parameter `ctx->sessions->num_items`
  645.   }
  646.   
  647. > int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c)
  648.   {
  649.       int ret = 0;

ssl/ssl_sess.c:663:9: Call
  661.   
  662.       CRYPTO_THREAD_write_lock(ctx->lock);
  663.       s = lh_SSL_SESSION_insert(ctx->sessions, c);
                 ^
  664.   
  665.       /*

ssl/ssl_locl.h:697:1: Parameter `lh->num_items`
    695.   } TLSEXT_INDEX;
    696.   
    697. > DEFINE_LHASH_OF(SSL_SESSION);
    698.   /* Needed in ssl_cert.c */
    699.   DEFINE_LHASH_OF(X509_NAME);

ssl/ssl_locl.h:697:1: Call
    695.   } TLSEXT_INDEX;
    696.   
    697. > DEFINE_LHASH_OF(SSL_SESSION);
    698.   /* Needed in ssl_cert.c */
    699.   DEFINE_LHASH_OF(X509_NAME);

crypto/lhash/lhash.c:70:1: Parameter `lh->num_items`
      68.   }
      69.   
      70. > void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data)
      71.   {
      72.       unsigned long hash;

test/handshake_helper.c:1352:21: Call
1350.           /* In case we're testing resumption without tickets. */
1351.           if (!TEST_true(SSL_CTX_add_session(server_ctx, session_in))
1352.                   || !TEST_true(SSL_set_session(client.ssl, session_in)))
                            ^
1353.               goto err;
1354.       }

ssl/ssl_sess.c:812:1: Parameter `s->session_ctx->sessions->num_items`
  810.   }
  811.   
  812. > int SSL_set_session(SSL *s, SSL_SESSION *session)
  813.   {
  814.       ssl_clear_bad_session(s);

ssl/ssl_sess.c:814:5: Call
  812.   int SSL_set_session(SSL *s, SSL_SESSION *session)
  813.   {
  814.       ssl_clear_bad_session(s);
             ^
  815.       if (s->ctx->method != s->method) {
  816.           if (!SSL_set_ssl_method(s, s->ctx->method))

ssl/ssl_sess.c:1107:1: Parameter `s->session_ctx->sessions->num_items`
    1105.   }
    1106.   
    1107. > int ssl_clear_bad_session(SSL *s)
    1108.   {
    1109.       if ((s->session != NULL) &&

ssl/ssl_sess.c:1112:9: Call
    1110.           !(s->shutdown & SSL_SENT_SHUTDOWN) &&
    1111.           !(SSL_in_init(s) || SSL_in_before(s))) {
    1112.           SSL_CTX_remove_session(s->session_ctx, s->session);
                    ^
    1113.           return 1;
    1114.       } else

ssl/ssl_sess.c:724:1: Parameter `ctx->sessions->num_items`
      722.   }
      723.   
      724. > int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
      725.   {
      726.       return remove_session_lock(ctx, c, 1);

ssl/ssl_sess.c:726:12: Call
      724.   int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
      725.   {
      726.       return remove_session_lock(ctx, c, 1);
                        ^
      727.   }
      728.   

ssl/ssl_sess.c:729:1: Parameter `ctx->sessions->num_items`
        727.   }
        728.   
        729. > static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)
        730.   {
        731.       SSL_SESSION *r;

ssl/ssl_sess.c:739:17: Call
        737.           if ((r = lh_SSL_SESSION_retrieve(ctx->sessions, c)) == c) {
        738.               ret = 1;
        739.               r = lh_SSL_SESSION_delete(ctx->sessions, c);
                               ^
        740.               SSL_SESSION_list_remove(ctx, c);
        741.           }

ssl/ssl_locl.h:697:1: Parameter `lh->num_items`
          695.   } TLSEXT_INDEX;
          696.   
          697. > DEFINE_LHASH_OF(SSL_SESSION);
          698.   /* Needed in ssl_cert.c */
          699.   DEFINE_LHASH_OF(X509_NAME);

ssl/ssl_locl.h:697:1: Call
          695.   } TLSEXT_INDEX;
          696.   
          697. > DEFINE_LHASH_OF(SSL_SESSION);
          698.   /* Needed in ssl_cert.c */
          699.   DEFINE_LHASH_OF(X509_NAME);

crypto/lhash/lhash.c:102:1: <LHS trace>
100.   }
101.   
102. > void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data)
103.   {
104.       unsigned long hash;

crypto/lhash/lhash.c:102:1: Parameter `lh->num_items`
            100.   }
            101.   
            102. > void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data)
            103.   {
            104.       unsigned long hash;

crypto/lhash/lhash.c:122:5: Binary operation: ([0, +oo] - 1):unsigned64 by call to `SSL_set_session` 
            120.       }
            121.   
            122.       lh->num_items--;
                       ^
            123.       if ((lh->num_nodes > MIN_NODES) &&
            124.           (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))
