test/handshake_helper.c:1347: 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:1335:10: Call
1333.           goto err;
1334.       }
1335.       if (!create_peer(&client, client_ctx)) {
                 ^
1336.           TEST_note("creating client context");
1337.           goto err;

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

ssl/ssl_lib.c:494:1: Parameter `ctx->sessions->num_items`
    492.   }
    493.   
    494. > SSL *SSL_new(SSL_CTX *ctx)
    495.   {
    496.       SSL *s;

test/handshake_helper.c:1346:14: Call
1344.       if (session_in != NULL) {
1345.           /* In case we're testing resumption without tickets. */
1346.           if (!TEST_true(SSL_CTX_add_session(server_ctx, session_in))
                     ^
1347.                   || !TEST_true(SSL_set_session(client.ssl, session_in)))
1348.               goto err;

ssl/ssl_sess.c:640:1: Parameter `ctx->sessions->num_items`
  638.   }
  639.   
  640. > int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c)
  641.   {
  642.       int ret = 0;

ssl/ssl_sess.c:656:9: Call
  654.   
  655.       CRYPTO_THREAD_write_lock(ctx->lock);
  656.       s = lh_SSL_SESSION_insert(ctx->sessions, c);
                 ^
  657.   
  658.       /*

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

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

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

test/handshake_helper.c:1347:21: Call
1345.           /* In case we're testing resumption without tickets. */
1346.           if (!TEST_true(SSL_CTX_add_session(server_ctx, session_in))
1347.                   || !TEST_true(SSL_set_session(client.ssl, session_in)))
                            ^
1348.               goto err;
1349.       }

ssl/ssl_sess.c:804:1: Parameter `s->session_ctx->sessions->num_items`
  802.   }
  803.   
  804. > int SSL_set_session(SSL *s, SSL_SESSION *session)
  805.   {
  806.       ssl_clear_bad_session(s);

ssl/ssl_sess.c:806:5: Call
  804.   int SSL_set_session(SSL *s, SSL_SESSION *session)
  805.   {
  806.       ssl_clear_bad_session(s);
             ^
  807.       if (s->ctx->method != s->method) {
  808.           if (!SSL_set_ssl_method(s, s->ctx->method))

ssl/ssl_sess.c:1053:1: Parameter `s->session_ctx->sessions->num_items`
    1051.   }
    1052.   
    1053. > int ssl_clear_bad_session(SSL *s)
    1054.   {
    1055.       if ((s->session != NULL) &&

ssl/ssl_sess.c:1058:9: Call
    1056.           !(s->shutdown & SSL_SENT_SHUTDOWN) &&
    1057.           !(SSL_in_init(s) || SSL_in_before(s))) {
    1058.           SSL_CTX_remove_session(s->session_ctx, s->session);
                    ^
    1059.           return (1);
    1060.       } else

ssl/ssl_sess.c:717:1: Parameter `ctx->sessions->num_items`
      715.   }
      716.   
      717. > int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
      718.   {
      719.       return remove_session_lock(ctx, c, 1);

ssl/ssl_sess.c:719:12: Call
      717.   int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
      718.   {
      719.       return remove_session_lock(ctx, c, 1);
                        ^
      720.   }
      721.   

ssl/ssl_sess.c:722:1: Parameter `ctx->sessions->num_items`
        720.   }
        721.   
        722. > static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)
        723.   {
        724.       SSL_SESSION *r;

ssl/ssl_sess.c:732:17: Call
        730.           if ((r = lh_SSL_SESSION_retrieve(ctx->sessions, c)) == c) {
        731.               ret = 1;
        732.               r = lh_SSL_SESSION_delete(ctx->sessions, c);
                               ^
        733.               SSL_SESSION_list_remove(ctx, c);
        734.           }

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

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

crypto/lhash/lhash.c:106:1: <LHS trace>
104.   }
105.   
106. > void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data)
107.   {
108.       unsigned long hash;

crypto/lhash/lhash.c:106:1: Parameter `lh->num_items`
            104.   }
            105.   
            106. > void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data)
            107.   {
            108.       unsigned long hash;

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