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:608:1: Parameter `ctx->sessions->num_items`
    606.   }
    607.   
    608. > SSL *SSL_new(SSL_CTX *ctx)
    609.   {
    610.       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:651:1: Parameter `ctx->sessions->num_items`
  649.   }
  650.   
  651. > int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c)
  652.   {
  653.       int ret = 0, discard;

ssl/ssl_sess.c:667:9: Call
  665.   
  666.       CRYPTO_THREAD_write_lock(ctx->lock);
  667.       s = lh_SSL_SESSION_insert(ctx->sessions, c);
                 ^
  668.   
  669.       /*

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:87:1: Parameter `lh->num_items`
      85.   }
      86.   
      87. > void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data)
      88.   {
      89.       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:817:1: Parameter `s->session_ctx->sessions->num_items`
  815.   }
  816.   
  817. > int SSL_set_session(SSL *s, SSL_SESSION *session)
  818.   {
  819.       ssl_clear_bad_session(s);

ssl/ssl_sess.c:819:5: Call
  817.   int SSL_set_session(SSL *s, SSL_SESSION *session)
  818.   {
  819.       ssl_clear_bad_session(s);
             ^
  820.       if (s->ctx->method != s->method) {
  821.           if (!SSL_set_ssl_method(s, s->ctx->method))

ssl/ssl_sess.c:1112:1: Parameter `s->session_ctx->sessions->num_items`
    1110.   }
    1111.   
    1112. > int ssl_clear_bad_session(SSL *s)
    1113.   {
    1114.       if ((s->session != NULL) &&

ssl/ssl_sess.c:1117:9: Call
    1115.           !(s->shutdown & SSL_SENT_SHUTDOWN) &&
    1116.           !(SSL_in_init(s) || SSL_in_before(s))) {
    1117.           SSL_CTX_remove_session(s->session_ctx, s->session);
                    ^
    1118.           return 1;
    1119.       } else

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

ssl/ssl_sess.c:731:12: Call
      729.   int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
      730.   {
      731.       return remove_session_lock(ctx, c, 1);
                        ^
      732.   }
      733.   

ssl/ssl_sess.c:734:1: Parameter `ctx->sessions->num_items`
        732.   }
        733.   
        734. > static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)
        735.   {
        736.       SSL_SESSION *r;

ssl/ssl_sess.c:744:17: Call
        742.           if ((r = lh_SSL_SESSION_retrieve(ctx->sessions, c)) == c) {
        743.               ret = 1;
        744.               r = lh_SSL_SESSION_delete(ctx->sessions, c);
                               ^
        745.               SSL_SESSION_list_remove(ctx, c);
        746.           }

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:119:1: <LHS trace>
117.   }
118.   
119. > void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data)
120.   {
121.       unsigned long hash;

crypto/lhash/lhash.c:119:1: Parameter `lh->num_items`
            117.   }
            118.   
            119. > void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data)
            120.   {
            121.       unsigned long hash;

crypto/lhash/lhash.c:139:5: Binary operation: ([0, +oo] - 1):unsigned64 by call to `SSL_set_session` 
            137.       }
            138.   
            139.       lh->num_items--;
                       ^
            140.       if ((lh->num_nodes > MIN_NODES) &&
            141.           (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))
