test/sslapitest.c:5012: error: NULL_DEREFERENCE
  pointer `sctx` last assigned on line 4943 could be null and is dereferenced by call to `SSL_CTX_free()` at line 5012, column 5.
Showing all 121 steps of the trace


test/sslapitest.c:4941:1: start of procedure test_key_update_in_write()
4939.    * Test 1: Server sends KeyUpdate while Client is writing
4940.    */
4941. > static int test_key_update_in_write(int tst)
4942.   {
4943.       SSL_CTX *cctx = NULL, *sctx = NULL;

test/sslapitest.c:4943:5: 
4941.   static int test_key_update_in_write(int tst)
4942.   {
4943. >     SSL_CTX *cctx = NULL, *sctx = NULL;
4944.       SSL *clientssl = NULL, *serverssl = NULL;
4945.       int testresult = 0;

test/sslapitest.c:4944:5: 
4942.   {
4943.       SSL_CTX *cctx = NULL, *sctx = NULL;
4944. >     SSL *clientssl = NULL, *serverssl = NULL;
4945.       int testresult = 0;
4946.       char buf[20];

test/sslapitest.c:4945:5: 
4943.       SSL_CTX *cctx = NULL, *sctx = NULL;
4944.       SSL *clientssl = NULL, *serverssl = NULL;
4945. >     int testresult = 0;
4946.       char buf[20];
4947.       static char *mess = "A test message";

test/sslapitest.c:4947:5: 
4945.       int testresult = 0;
4946.       char buf[20];
4947. >     static char *mess = "A test message";
4948.       BIO *bretry = BIO_new(bio_s_always_retry());
4949.       BIO *tmp = NULL;

test/sslapitest.c:4948:5: 
4946.       char buf[20];
4947.       static char *mess = "A test message";
4948. >     BIO *bretry = BIO_new(bio_s_always_retry());
4949.       BIO *tmp = NULL;
4950.       SSL *peerupdate = NULL, *peerwrite = NULL;

test/ssltestlib.c:633:1: start of procedure bio_s_always_retry()
  631.   static int always_retry_puts(BIO *bp, const char *str);
  632.   
  633. > const BIO_METHOD *bio_s_always_retry(void)
  634.   {
  635.       if (meth_always_retry == NULL) {

test/ssltestlib.c:635:9: Taking true branch
  633.   const BIO_METHOD *bio_s_always_retry(void)
  634.   {
  635.       if (meth_always_retry == NULL) {
                 ^
  636.           if (!TEST_ptr(meth_always_retry = BIO_meth_new(BIO_TYPE_ALWAYS_RETRY,
  637.                                                          "Always Retry"))

test/ssltestlib.c:636:14: Skipping BIO_meth_new(): empty list of specs
  634.   {
  635.       if (meth_always_retry == NULL) {
  636.           if (!TEST_ptr(meth_always_retry = BIO_meth_new(BIO_TYPE_ALWAYS_RETRY,
                      ^
  637.                                                          "Always Retry"))
  638.               || !TEST_true(BIO_meth_set_write(meth_always_retry,

test/testutil/tests.c:252:1: start of procedure test_ptr()
    250.   }
    251.   
    252. > int test_ptr(const char *file, int line, const char *s, const void *p)
    253.   {
    254.       if (p != NULL)

test/testutil/tests.c:254:9: Taking true branch
    252.   int test_ptr(const char *file, int line, const char *s, const void *p)
    253.   {
    254.       if (p != NULL)
                   ^
    255.           return 1;
    256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:255:9: 
    253.   {
    254.       if (p != NULL)
    255. >         return 1;
    256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
    257.       return 0;

test/testutil/tests.c:258:1: return from a call to test_ptr
    256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
    257.       return 0;
    258. > }
    259.   
    260.   int test_true(const char *file, int line, const char *s, int b)

test/ssltestlib.c:636:14: Taking false branch
  634.   {
  635.       if (meth_always_retry == NULL) {
  636.           if (!TEST_ptr(meth_always_retry = BIO_meth_new(BIO_TYPE_ALWAYS_RETRY,
                      ^
  637.                                                          "Always Retry"))
  638.               || !TEST_true(BIO_meth_set_write(meth_always_retry,

test/ssltestlib.c:638:17: 
  636.           if (!TEST_ptr(meth_always_retry = BIO_meth_new(BIO_TYPE_ALWAYS_RETRY,
  637.                                                          "Always Retry"))
  638. >             || !TEST_true(BIO_meth_set_write(meth_always_retry,
  639.                                                always_retry_write))
  640.               || !TEST_true(BIO_meth_set_read(meth_always_retry,

crypto/bio/bio_meth.c:89:1: start of procedure BIO_meth_set_write()
    87.   }
    88.   
    89. > int BIO_meth_set_write(BIO_METHOD *biom,
    90.                          int (*bwrite) (BIO *, const char *, int))
    91.   {

crypto/bio/bio_meth.c:92:5: 
    90.                          int (*bwrite) (BIO *, const char *, int))
    91.   {
    92. >     biom->bwrite_old = bwrite;
    93.       biom->bwrite = bwrite_conv;
    94.       return 1;

crypto/bio/bio_meth.c:93:5: 
    91.   {
    92.       biom->bwrite_old = bwrite;
    93. >     biom->bwrite = bwrite_conv;
    94.       return 1;
    95.   }

crypto/bio/bio_meth.c:94:5: 
    92.       biom->bwrite_old = bwrite;
    93.       biom->bwrite = bwrite_conv;
    94. >     return 1;
    95.   }
    96.   

crypto/bio/bio_meth.c:95:1: return from a call to BIO_meth_set_write
    93.       biom->bwrite = bwrite_conv;
    94.       return 1;
    95. > }
    96.   
    97.   int BIO_meth_set_write_ex(BIO_METHOD *biom,

test/ssltestlib.c:638:17: Condition is true
  636.           if (!TEST_ptr(meth_always_retry = BIO_meth_new(BIO_TYPE_ALWAYS_RETRY,
  637.                                                          "Always Retry"))
  638.               || !TEST_true(BIO_meth_set_write(meth_always_retry,
                         ^
  639.                                                always_retry_write))
  640.               || !TEST_true(BIO_meth_set_read(meth_always_retry,

test/testutil/tests.c:260:1: start of procedure test_true()
    258.   }
    259.   
    260. > int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)

test/testutil/tests.c:262:9: Taking true branch
    260.   int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)
                   ^
    263.           return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");

test/testutil/tests.c:263:9: 
    261.   {
    262.       if (b)
    263. >         return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;

test/testutil/tests.c:266:1: return from a call to test_true
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;
    266. > }
    267.   
    268.   int test_false(const char *file, int line, const char *s, int b)

test/ssltestlib.c:638:17: Taking false branch
  636.           if (!TEST_ptr(meth_always_retry = BIO_meth_new(BIO_TYPE_ALWAYS_RETRY,
  637.                                                          "Always Retry"))
  638.               || !TEST_true(BIO_meth_set_write(meth_always_retry,
                         ^
  639.                                                always_retry_write))
  640.               || !TEST_true(BIO_meth_set_read(meth_always_retry,

test/ssltestlib.c:640:17: 
  638.               || !TEST_true(BIO_meth_set_write(meth_always_retry,
  639.                                                always_retry_write))
  640. >             || !TEST_true(BIO_meth_set_read(meth_always_retry,
  641.                                               always_retry_read))
  642.               || !TEST_true(BIO_meth_set_puts(meth_always_retry,

crypto/bio/bio_meth.c:135:1: start of procedure BIO_meth_set_read()
    133.   }
    134.   
    135. > int BIO_meth_set_read(BIO_METHOD *biom,
    136.                         int (*bread) (BIO *, char *, int))
    137.   {

crypto/bio/bio_meth.c:138:5: 
    136.                         int (*bread) (BIO *, char *, int))
    137.   {
    138. >     biom->bread_old = bread;
    139.       biom->bread = bread_conv;
    140.       return 1;

crypto/bio/bio_meth.c:139:5: 
    137.   {
    138.       biom->bread_old = bread;
    139. >     biom->bread = bread_conv;
    140.       return 1;
    141.   }

crypto/bio/bio_meth.c:140:5: 
    138.       biom->bread_old = bread;
    139.       biom->bread = bread_conv;
    140. >     return 1;
    141.   }
    142.   

crypto/bio/bio_meth.c:141:1: return from a call to BIO_meth_set_read
    139.       biom->bread = bread_conv;
    140.       return 1;
    141. > }
    142.   
    143.   int BIO_meth_set_read_ex(BIO_METHOD *biom,

test/ssltestlib.c:640:17: Condition is true
  638.               || !TEST_true(BIO_meth_set_write(meth_always_retry,
  639.                                                always_retry_write))
  640.               || !TEST_true(BIO_meth_set_read(meth_always_retry,
                         ^
  641.                                               always_retry_read))
  642.               || !TEST_true(BIO_meth_set_puts(meth_always_retry,

test/testutil/tests.c:260:1: start of procedure test_true()
    258.   }
    259.   
    260. > int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)

test/testutil/tests.c:262:9: Taking true branch
    260.   int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)
                   ^
    263.           return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");

test/testutil/tests.c:263:9: 
    261.   {
    262.       if (b)
    263. >         return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;

test/testutil/tests.c:266:1: return from a call to test_true
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;
    266. > }
    267.   
    268.   int test_false(const char *file, int line, const char *s, int b)

test/ssltestlib.c:640:17: Taking false branch
  638.               || !TEST_true(BIO_meth_set_write(meth_always_retry,
  639.                                                always_retry_write))
  640.               || !TEST_true(BIO_meth_set_read(meth_always_retry,
                         ^
  641.                                               always_retry_read))
  642.               || !TEST_true(BIO_meth_set_puts(meth_always_retry,

test/ssltestlib.c:642:17: 
  640.               || !TEST_true(BIO_meth_set_read(meth_always_retry,
  641.                                               always_retry_read))
  642. >             || !TEST_true(BIO_meth_set_puts(meth_always_retry,
  643.                                               always_retry_puts))
  644.               || !TEST_true(BIO_meth_set_gets(meth_always_retry,

crypto/bio/bio_meth.c:156:1: start of procedure BIO_meth_set_puts()
    154.   }
    155.   
    156. > int BIO_meth_set_puts(BIO_METHOD *biom,
    157.                         int (*bputs) (BIO *, const char *))
    158.   {

crypto/bio/bio_meth.c:159:5: 
    157.                         int (*bputs) (BIO *, const char *))
    158.   {
    159. >     biom->bputs = bputs;
    160.       return 1;
    161.   }

crypto/bio/bio_meth.c:160:5: 
    158.   {
    159.       biom->bputs = bputs;
    160. >     return 1;
    161.   }
    162.   

crypto/bio/bio_meth.c:161:1: return from a call to BIO_meth_set_puts
    159.       biom->bputs = bputs;
    160.       return 1;
    161. > }
    162.   
    163.   int (*BIO_meth_get_gets(const BIO_METHOD *biom)) (BIO *, char *, int)

test/ssltestlib.c:642:17: Condition is true
  640.               || !TEST_true(BIO_meth_set_read(meth_always_retry,
  641.                                               always_retry_read))
  642.               || !TEST_true(BIO_meth_set_puts(meth_always_retry,
                         ^
  643.                                               always_retry_puts))
  644.               || !TEST_true(BIO_meth_set_gets(meth_always_retry,

test/testutil/tests.c:260:1: start of procedure test_true()
    258.   }
    259.   
    260. > int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)

test/testutil/tests.c:262:9: Taking true branch
    260.   int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)
                   ^
    263.           return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");

test/testutil/tests.c:263:9: 
    261.   {
    262.       if (b)
    263. >         return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;

test/testutil/tests.c:266:1: return from a call to test_true
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;
    266. > }
    267.   
    268.   int test_false(const char *file, int line, const char *s, int b)

test/ssltestlib.c:642:17: Taking false branch
  640.               || !TEST_true(BIO_meth_set_read(meth_always_retry,
  641.                                               always_retry_read))
  642.               || !TEST_true(BIO_meth_set_puts(meth_always_retry,
                         ^
  643.                                               always_retry_puts))
  644.               || !TEST_true(BIO_meth_set_gets(meth_always_retry,

test/ssltestlib.c:644:17: 
  642.               || !TEST_true(BIO_meth_set_puts(meth_always_retry,
  643.                                               always_retry_puts))
  644. >             || !TEST_true(BIO_meth_set_gets(meth_always_retry,
  645.                                               always_retry_gets))
  646.               || !TEST_true(BIO_meth_set_ctrl(meth_always_retry,

crypto/bio/bio_meth.c:168:1: start of procedure BIO_meth_set_gets()
    166.   }
    167.   
    168. > int BIO_meth_set_gets(BIO_METHOD *biom,
    169.                         int (*bgets) (BIO *, char *, int))
    170.   {

crypto/bio/bio_meth.c:171:5: 
    169.                         int (*bgets) (BIO *, char *, int))
    170.   {
    171. >     biom->bgets = bgets;
    172.       return 1;
    173.   }

crypto/bio/bio_meth.c:172:5: 
    170.   {
    171.       biom->bgets = bgets;
    172. >     return 1;
    173.   }
    174.   

crypto/bio/bio_meth.c:173:1: return from a call to BIO_meth_set_gets
    171.       biom->bgets = bgets;
    172.       return 1;
    173. > }
    174.   
    175.   long (*BIO_meth_get_ctrl(const BIO_METHOD *biom)) (BIO *, int, long, void *)

test/ssltestlib.c:644:17: Condition is true
  642.               || !TEST_true(BIO_meth_set_puts(meth_always_retry,
  643.                                               always_retry_puts))
  644.               || !TEST_true(BIO_meth_set_gets(meth_always_retry,
                         ^
  645.                                               always_retry_gets))
  646.               || !TEST_true(BIO_meth_set_ctrl(meth_always_retry,

test/testutil/tests.c:260:1: start of procedure test_true()
    258.   }
    259.   
    260. > int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)

test/testutil/tests.c:262:9: Taking true branch
    260.   int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)
                   ^
    263.           return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");

test/testutil/tests.c:263:9: 
    261.   {
    262.       if (b)
    263. >         return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;

test/testutil/tests.c:266:1: return from a call to test_true
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;
    266. > }
    267.   
    268.   int test_false(const char *file, int line, const char *s, int b)

test/ssltestlib.c:644:17: Taking false branch
  642.               || !TEST_true(BIO_meth_set_puts(meth_always_retry,
  643.                                               always_retry_puts))
  644.               || !TEST_true(BIO_meth_set_gets(meth_always_retry,
                         ^
  645.                                               always_retry_gets))
  646.               || !TEST_true(BIO_meth_set_ctrl(meth_always_retry,

test/ssltestlib.c:646:17: 
  644.               || !TEST_true(BIO_meth_set_gets(meth_always_retry,
  645.                                               always_retry_gets))
  646. >             || !TEST_true(BIO_meth_set_ctrl(meth_always_retry,
  647.                                               always_retry_ctrl))
  648.               || !TEST_true(BIO_meth_set_create(meth_always_retry,

crypto/bio/bio_meth.c:180:1: start of procedure BIO_meth_set_ctrl()
    178.   }
    179.   
    180. > int BIO_meth_set_ctrl(BIO_METHOD *biom,
    181.                         long (*ctrl) (BIO *, int, long, void *))
    182.   {

crypto/bio/bio_meth.c:183:5: 
    181.                         long (*ctrl) (BIO *, int, long, void *))
    182.   {
    183. >     biom->ctrl = ctrl;
    184.       return 1;
    185.   }

crypto/bio/bio_meth.c:184:5: 
    182.   {
    183.       biom->ctrl = ctrl;
    184. >     return 1;
    185.   }
    186.   

crypto/bio/bio_meth.c:185:1: return from a call to BIO_meth_set_ctrl
    183.       biom->ctrl = ctrl;
    184.       return 1;
    185. > }
    186.   
    187.   int (*BIO_meth_get_create(const BIO_METHOD *biom)) (BIO *)

test/ssltestlib.c:646:17: Condition is true
  644.               || !TEST_true(BIO_meth_set_gets(meth_always_retry,
  645.                                               always_retry_gets))
  646.               || !TEST_true(BIO_meth_set_ctrl(meth_always_retry,
                         ^
  647.                                               always_retry_ctrl))
  648.               || !TEST_true(BIO_meth_set_create(meth_always_retry,

test/testutil/tests.c:260:1: start of procedure test_true()
    258.   }
    259.   
    260. > int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)

test/testutil/tests.c:262:9: Taking true branch
    260.   int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)
                   ^
    263.           return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");

test/testutil/tests.c:263:9: 
    261.   {
    262.       if (b)
    263. >         return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;

test/testutil/tests.c:266:1: return from a call to test_true
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;
    266. > }
    267.   
    268.   int test_false(const char *file, int line, const char *s, int b)

test/ssltestlib.c:646:17: Taking false branch
  644.               || !TEST_true(BIO_meth_set_gets(meth_always_retry,
  645.                                               always_retry_gets))
  646.               || !TEST_true(BIO_meth_set_ctrl(meth_always_retry,
                         ^
  647.                                               always_retry_ctrl))
  648.               || !TEST_true(BIO_meth_set_create(meth_always_retry,

test/ssltestlib.c:648:17: 
  646.               || !TEST_true(BIO_meth_set_ctrl(meth_always_retry,
  647.                                               always_retry_ctrl))
  648. >             || !TEST_true(BIO_meth_set_create(meth_always_retry,
  649.                                                 always_retry_new))
  650.               || !TEST_true(BIO_meth_set_destroy(meth_always_retry,

crypto/bio/bio_meth.c:192:1: start of procedure BIO_meth_set_create()
    190.   }
    191.   
    192. > int BIO_meth_set_create(BIO_METHOD *biom, int (*create) (BIO *))
    193.   {
    194.       biom->create = create;

crypto/bio/bio_meth.c:194:5: 
    192.   int BIO_meth_set_create(BIO_METHOD *biom, int (*create) (BIO *))
    193.   {
    194. >     biom->create = create;
    195.       return 1;
    196.   }

crypto/bio/bio_meth.c:195:5: 
    193.   {
    194.       biom->create = create;
    195. >     return 1;
    196.   }
    197.   

crypto/bio/bio_meth.c:196:1: return from a call to BIO_meth_set_create
    194.       biom->create = create;
    195.       return 1;
    196. > }
    197.   
    198.   int (*BIO_meth_get_destroy(const BIO_METHOD *biom)) (BIO *)

test/ssltestlib.c:648:17: Condition is true
  646.               || !TEST_true(BIO_meth_set_ctrl(meth_always_retry,
  647.                                               always_retry_ctrl))
  648.               || !TEST_true(BIO_meth_set_create(meth_always_retry,
                         ^
  649.                                                 always_retry_new))
  650.               || !TEST_true(BIO_meth_set_destroy(meth_always_retry,

test/testutil/tests.c:260:1: start of procedure test_true()
    258.   }
    259.   
    260. > int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)

test/testutil/tests.c:262:9: Taking true branch
    260.   int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)
                   ^
    263.           return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");

test/testutil/tests.c:263:9: 
    261.   {
    262.       if (b)
    263. >         return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;

test/testutil/tests.c:266:1: return from a call to test_true
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;
    266. > }
    267.   
    268.   int test_false(const char *file, int line, const char *s, int b)

test/ssltestlib.c:648:17: Taking false branch
  646.               || !TEST_true(BIO_meth_set_ctrl(meth_always_retry,
  647.                                               always_retry_ctrl))
  648.               || !TEST_true(BIO_meth_set_create(meth_always_retry,
                         ^
  649.                                                 always_retry_new))
  650.               || !TEST_true(BIO_meth_set_destroy(meth_always_retry,

test/ssltestlib.c:650:17: 
  648.               || !TEST_true(BIO_meth_set_create(meth_always_retry,
  649.                                                 always_retry_new))
  650. >             || !TEST_true(BIO_meth_set_destroy(meth_always_retry,
  651.                                                  always_retry_free)))
  652.               return NULL;

crypto/bio/bio_meth.c:203:1: start of procedure BIO_meth_set_destroy()
    201.   }
    202.   
    203. > int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy) (BIO *))
    204.   {
    205.       biom->destroy = destroy;

crypto/bio/bio_meth.c:205:5: 
    203.   int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy) (BIO *))
    204.   {
    205. >     biom->destroy = destroy;
    206.       return 1;
    207.   }

crypto/bio/bio_meth.c:206:5: 
    204.   {
    205.       biom->destroy = destroy;
    206. >     return 1;
    207.   }
    208.   

crypto/bio/bio_meth.c:207:1: return from a call to BIO_meth_set_destroy
    205.       biom->destroy = destroy;
    206.       return 1;
    207. > }
    208.   
    209.   long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom)) (BIO *, int, BIO_info_cb *)

test/ssltestlib.c:650:17: Condition is true
  648.               || !TEST_true(BIO_meth_set_create(meth_always_retry,
  649.                                                 always_retry_new))
  650.               || !TEST_true(BIO_meth_set_destroy(meth_always_retry,
                         ^
  651.                                                  always_retry_free)))
  652.               return NULL;

test/testutil/tests.c:260:1: start of procedure test_true()
    258.   }
    259.   
    260. > int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)

test/testutil/tests.c:262:9: Taking true branch
    260.   int test_true(const char *file, int line, const char *s, int b)
    261.   {
    262.       if (b)
                   ^
    263.           return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");

test/testutil/tests.c:263:9: 
    261.   {
    262.       if (b)
    263. >         return 1;
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;

test/testutil/tests.c:266:1: return from a call to test_true
    264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
    265.       return 0;
    266. > }
    267.   
    268.   int test_false(const char *file, int line, const char *s, int b)

test/ssltestlib.c:650:17: Taking false branch
  648.               || !TEST_true(BIO_meth_set_create(meth_always_retry,
  649.                                                 always_retry_new))
  650.               || !TEST_true(BIO_meth_set_destroy(meth_always_retry,
                         ^
  651.                                                  always_retry_free)))
  652.               return NULL;

test/ssltestlib.c:654:5: 
  652.               return NULL;
  653.       }
  654. >     return meth_always_retry;
  655.   }
  656.   

test/ssltestlib.c:655:1: return from a call to bio_s_always_retry
  653.       }
  654.       return meth_always_retry;
  655. > }
  656.   
  657.   void bio_s_always_retry_free(void)

test/sslapitest.c:4948:5: Skipping BIO_new(): empty list of specs
4946.       char buf[20];
4947.       static char *mess = "A test message";
4948.       BIO *bretry = BIO_new(bio_s_always_retry());
            ^
4949.       BIO *tmp = NULL;
4950.       SSL *peerupdate = NULL, *peerwrite = NULL;

test/sslapitest.c:4949:5: 
4947.       static char *mess = "A test message";
4948.       BIO *bretry = BIO_new(bio_s_always_retry());
4949. >     BIO *tmp = NULL;
4950.       SSL *peerupdate = NULL, *peerwrite = NULL;
4951.   

test/sslapitest.c:4950:5: 
4948.       BIO *bretry = BIO_new(bio_s_always_retry());
4949.       BIO *tmp = NULL;
4950. >     SSL *peerupdate = NULL, *peerwrite = NULL;
4951.   
4952.       if (!TEST_ptr(bretry)

test/sslapitest.c:4952:10: 
4950.       SSL *peerupdate = NULL, *peerwrite = NULL;
4951.   
4952. >     if (!TEST_ptr(bretry)
4953.               || !TEST_true(create_ssl_ctx_pair(TLS_server_method(),
4954.                                                 TLS_client_method(),

test/testutil/tests.c:252:1: start of procedure test_ptr()
  250.   }
  251.   
  252. > int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)

test/testutil/tests.c:254:9: Taking false branch
  252.   int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)
                 ^
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:256:5: Skipping test_fail_message(): empty list of specs
  254.       if (p != NULL)
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
             ^
  257.       return 0;
  258.   }

test/testutil/tests.c:257:5: 
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257. >     return 0;
  258.   }
  259.   

test/testutil/tests.c:258:1: return from a call to test_ptr
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;
  258. > }
  259.   
  260.   int test_true(const char *file, int line, const char *s, int b)

test/sslapitest.c:4952:10: Taking true branch
4950.       SSL *peerupdate = NULL, *peerwrite = NULL;
4951.   
4952.       if (!TEST_ptr(bretry)
                 ^
4953.               || !TEST_true(create_ssl_ctx_pair(TLS_server_method(),
4954.                                                 TLS_client_method(),

test/sslapitest.c:5009:2: 
5007.       testresult = 1;
5008.   
5009. >  end:
5010.       SSL_free(serverssl);
5011.       SSL_free(clientssl);

test/sslapitest.c:5010:5: Skipping SSL_free(): empty list of specs
5008.   
5009.    end:
5010.       SSL_free(serverssl);
            ^
5011.       SSL_free(clientssl);
5012.       SSL_CTX_free(sctx);

test/sslapitest.c:5011:5: Skipping SSL_free(): empty list of specs
5009.    end:
5010.       SSL_free(serverssl);
5011.       SSL_free(clientssl);
            ^
5012.       SSL_CTX_free(sctx);
5013.       SSL_CTX_free(cctx);

test/sslapitest.c:5012:5: 
5010.       SSL_free(serverssl);
5011.       SSL_free(clientssl);
5012. >     SSL_CTX_free(sctx);
5013.       SSL_CTX_free(cctx);
5014.       BIO_free(bretry);

ssl/ssl_lib.c:3240:1: start of procedure SSL_CTX_free()
  3238.   }
  3239.   
  3240. > void SSL_CTX_free(SSL_CTX *a)
  3241.   {
  3242.       int i;

ssl/ssl_lib.c:3244:9: Taking false branch
  3242.       int i;
  3243.   
  3244.       if (a == NULL)
                  ^
  3245.           return;
  3246.   

ssl/ssl_lib.c:3247:5: 
  3245.           return;
  3246.   
  3247. >     CRYPTO_DOWN_REF(&a->references, &i, a->lock);
  3248.       REF_PRINT_COUNT("SSL_CTX", a);
  3249.       if (i > 0)

include/internal/refcount.h:49:1: start of procedure CRYPTO_DOWN_REF()
    47.    * otherwise imply an acquire fence. Hence conditional acquire fence...
    48.    */
    49. > static inline int CRYPTO_DOWN_REF(_Atomic int *val, int *ret, void *lock)
    50.   {
    51.       *ret = atomic_fetch_sub_explicit(val, 1, memory_order_relaxed) - 1;

include/internal/refcount.h:51:5: 
    49.   static inline int CRYPTO_DOWN_REF(_Atomic int *val, int *ret, void *lock)
    50.   {
    51. >     *ret = atomic_fetch_sub_explicit(val, 1, memory_order_relaxed) - 1;
    52.       if (*ret == 0)
    53.           atomic_thread_fence(memory_order_acquire);

include/internal/refcount.h:52:9: Taking true branch
    50.   {
    51.       *ret = atomic_fetch_sub_explicit(val, 1, memory_order_relaxed) - 1;
    52.       if (*ret == 0)
                  ^
    53.           atomic_thread_fence(memory_order_acquire);
    54.       return 1;

include/internal/refcount.h:53:9: Skipping __c11_atomic_thread_fence(): method has no implementation
    51.       *ret = atomic_fetch_sub_explicit(val, 1, memory_order_relaxed) - 1;
    52.       if (*ret == 0)
    53.           atomic_thread_fence(memory_order_acquire);
                  ^
    54.       return 1;
    55.   }

include/internal/refcount.h:54:5: 
    52.       if (*ret == 0)
    53.           atomic_thread_fence(memory_order_acquire);
    54. >     return 1;
    55.   }
    56.   

include/internal/refcount.h:55:1: return from a call to CRYPTO_DOWN_REF
    53.           atomic_thread_fence(memory_order_acquire);
    54.       return 1;
    55. > }
    56.   
    57.   #  elif defined(__GNUC__) && defined(__ATOMIC_RELAXED) && __GCC_ATOMIC_INT_LOCK_FREE > 0

ssl/ssl_lib.c:3249:9: Taking true branch
  3247.       CRYPTO_DOWN_REF(&a->references, &i, a->lock);
  3248.       REF_PRINT_COUNT("SSL_CTX", a);
  3249.       if (i > 0)
                  ^
  3250.           return;
  3251.       REF_ASSERT_ISNT(i < 0);

ssl/ssl_lib.c:3250:9: 
  3248.       REF_PRINT_COUNT("SSL_CTX", a);
  3249.       if (i > 0)
  3250. >         return;
  3251.       REF_ASSERT_ISNT(i < 0);
  3252.   

ssl/ssl_lib.c:3302:1: return from a call to SSL_CTX_free
  3300.   
  3301.       OPENSSL_free(a);
  3302. > }
  3303.   
  3304.   void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb)

static int test_key_update_in_write(int tst)
{
    SSL_CTX *cctx = NULL, *sctx = NULL;
    SSL *clientssl = NULL, *serverssl = NULL;
    int testresult = 0;
    char buf[20];
    static char *mess = "A test message";
    BIO *bretry = BIO_new(bio_s_always_retry());
    BIO *tmp = NULL;
    SSL *peerupdate = NULL, *peerwrite = NULL;
    if (!TEST_ptr(bretry)
            || !TEST_true(create_ssl_ctx_pair(TLS_server_method(),
                                              TLS_client_method(),
                                              TLS1_3_VERSION,
                                              0,
                                              &sctx, &cctx, cert, privkey))
            || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl,
                                             NULL, NULL))
            || !TEST_true(create_ssl_connection(serverssl, clientssl,
                                                SSL_ERROR_NONE)))
        goto end;
    peerupdate = tst == 0 ? clientssl : serverssl;
    peerwrite = tst == 0 ? serverssl : clientssl;
    if (!TEST_true(SSL_key_update(peerupdate, SSL_KEY_UPDATE_REQUESTED))
            || !TEST_true(SSL_do_handshake(peerupdate)))
        goto end;
    tmp = SSL_get_wbio(peerwrite);
    if (!TEST_ptr(tmp) || !TEST_true(BIO_up_ref(tmp))) {
        tmp = NULL;
        goto end;
    }
    SSL_set0_wbio(peerwrite, bretry);
    bretry = NULL;
    if (!TEST_int_eq(SSL_write(peerwrite, mess, strlen(mess)), -1)
            || !TEST_int_eq(SSL_get_error(peerwrite, 0), SSL_ERROR_WANT_WRITE))
        goto end;
    SSL_set0_wbio(peerwrite, tmp);
    tmp = NULL;
    if (!TEST_int_eq(SSL_read(peerwrite, buf, sizeof(buf)), -1)
            || !TEST_int_eq(SSL_get_error(peerwrite, 0), SSL_ERROR_WANT_READ))
        goto end;
    if (!TEST_int_eq(SSL_write(peerwrite, mess, strlen(mess)), strlen(mess))
            || !TEST_int_eq(SSL_read(peerupdate, buf, sizeof(buf)), strlen(mess)))
        goto end;
    if (!TEST_int_eq(SSL_write(peerwrite, mess, strlen(mess)), strlen(mess))
            || !TEST_int_eq(SSL_read(peerupdate, buf, sizeof(buf)), strlen(mess)))
        goto end;
    testresult = 1;
 end:
    SSL_free(serverssl);
    SSL_free(clientssl);
    SSL_CTX_free(sctx);
    SSL_CTX_free(cctx);
    BIO_free(bretry);
    BIO_free(tmp);
    return testresult;
}
['static int test_key_update_in_write(int tst)\n{\n    SSL_CTX *cctx = NULL, *sctx = NULL;\n    SSL *clientssl = NULL, *serverssl = NULL;\n    int testresult = 0;\n    char buf[20];\n    static char *mess = "A test message";\n    BIO *bretry = BIO_new(bio_s_always_retry());\n    BIO *tmp = NULL;\n    SSL *peerupdate = NULL, *peerwrite = NULL;\n    if (!TEST_ptr(bretry)\n            || !TEST_true(create_ssl_ctx_pair(TLS_server_method(),\n                                              TLS_client_method(),\n                                              TLS1_3_VERSION,\n                                              0,\n                                              &sctx, &cctx, cert, privkey))\n            || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl,\n                                             NULL, NULL))\n            || !TEST_true(create_ssl_connection(serverssl, clientssl,\n                                                SSL_ERROR_NONE)))\n        goto end;\n    peerupdate = tst == 0 ? clientssl : serverssl;\n    peerwrite = tst == 0 ? serverssl : clientssl;\n    if (!TEST_true(SSL_key_update(peerupdate, SSL_KEY_UPDATE_REQUESTED))\n            || !TEST_true(SSL_do_handshake(peerupdate)))\n        goto end;\n    tmp = SSL_get_wbio(peerwrite);\n    if (!TEST_ptr(tmp) || !TEST_true(BIO_up_ref(tmp))) {\n        tmp = NULL;\n        goto end;\n    }\n    SSL_set0_wbio(peerwrite, bretry);\n    bretry = NULL;\n    if (!TEST_int_eq(SSL_write(peerwrite, mess, strlen(mess)), -1)\n            || !TEST_int_eq(SSL_get_error(peerwrite, 0), SSL_ERROR_WANT_WRITE))\n        goto end;\n    SSL_set0_wbio(peerwrite, tmp);\n    tmp = NULL;\n    if (!TEST_int_eq(SSL_read(peerwrite, buf, sizeof(buf)), -1)\n            || !TEST_int_eq(SSL_get_error(peerwrite, 0), SSL_ERROR_WANT_READ))\n        goto end;\n    if (!TEST_int_eq(SSL_write(peerwrite, mess, strlen(mess)), strlen(mess))\n            || !TEST_int_eq(SSL_read(peerupdate, buf, sizeof(buf)), strlen(mess)))\n        goto end;\n    if (!TEST_int_eq(SSL_write(peerwrite, mess, strlen(mess)), strlen(mess))\n            || !TEST_int_eq(SSL_read(peerupdate, buf, sizeof(buf)), strlen(mess)))\n        goto end;\n    testresult = 1;\n end:\n    SSL_free(serverssl);\n    SSL_free(clientssl);\n    SSL_CTX_free(sctx);\n    SSL_CTX_free(cctx);\n    BIO_free(bretry);\n    BIO_free(tmp);\n    return testresult;\n}', 'const BIO_METHOD *bio_s_always_retry(void)\n{\n    if (meth_always_retry == NULL) {\n        if (!TEST_ptr(meth_always_retry = BIO_meth_new(BIO_TYPE_ALWAYS_RETRY,\n                                                       "Always Retry"))\n            || !TEST_true(BIO_meth_set_write(meth_always_retry,\n                                             always_retry_write))\n            || !TEST_true(BIO_meth_set_read(meth_always_retry,\n                                            always_retry_read))\n            || !TEST_true(BIO_meth_set_puts(meth_always_retry,\n                                            always_retry_puts))\n            || !TEST_true(BIO_meth_set_gets(meth_always_retry,\n                                            always_retry_gets))\n            || !TEST_true(BIO_meth_set_ctrl(meth_always_retry,\n                                            always_retry_ctrl))\n            || !TEST_true(BIO_meth_set_create(meth_always_retry,\n                                              always_retry_new))\n            || !TEST_true(BIO_meth_set_destroy(meth_always_retry,\n                                               always_retry_free)))\n            return NULL;\n    }\n    return meth_always_retry;\n}', 'int test_ptr(const char *file, int line, const char *s, const void *p)\n{\n    if (p != NULL)\n        return 1;\n    test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);\n    return 0;\n}', 'int BIO_meth_set_write(BIO_METHOD *biom,\n                       int (*bwrite) (BIO *, const char *, int))\n{\n    biom->bwrite_old = bwrite;\n    biom->bwrite = bwrite_conv;\n    return 1;\n}', 'int test_true(const char *file, int line, const char *s, int b)\n{\n    if (b)\n        return 1;\n    test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");\n    return 0;\n}', 'int BIO_meth_set_read(BIO_METHOD *biom,\n                      int (*bread) (BIO *, char *, int))\n{\n    biom->bread_old = bread;\n    biom->bread = bread_conv;\n    return 1;\n}', 'int BIO_meth_set_puts(BIO_METHOD *biom,\n                      int (*bputs) (BIO *, const char *))\n{\n    biom->bputs = bputs;\n    return 1;\n}', 'int BIO_meth_set_gets(BIO_METHOD *biom,\n                      int (*bgets) (BIO *, char *, int))\n{\n    biom->bgets = bgets;\n    return 1;\n}', 'int BIO_meth_set_ctrl(BIO_METHOD *biom,\n                      long (*ctrl) (BIO *, int, long, void *))\n{\n    biom->ctrl = ctrl;\n    return 1;\n}', 'int BIO_meth_set_create(BIO_METHOD *biom, int (*create) (BIO *))\n{\n    biom->create = create;\n    return 1;\n}', 'int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy) (BIO *))\n{\n    biom->destroy = destroy;\n    return 1;\n}', 'void SSL_CTX_free(SSL_CTX *a)\n{\n    int i;\n    if (a == NULL)\n        return;\n    CRYPTO_DOWN_REF(&a->references, &i, a->lock);\n    REF_PRINT_COUNT("SSL_CTX", a);\n    if (i > 0)\n        return;\n    REF_ASSERT_ISNT(i < 0);\n    X509_VERIFY_PARAM_free(a->param);\n    dane_ctx_final(&a->dane);\n    if (a->sessions != NULL)\n        SSL_CTX_flush_sessions(a, 0);\n    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);\n    lh_SSL_SESSION_free(a->sessions);\n    X509_STORE_free(a->cert_store);\n#ifndef OPENSSL_NO_CT\n    CTLOG_STORE_free(a->ctlog_store);\n#endif\n    sk_SSL_CIPHER_free(a->cipher_list);\n    sk_SSL_CIPHER_free(a->cipher_list_by_id);\n    sk_SSL_CIPHER_free(a->tls13_ciphersuites);\n    ssl_cert_free(a->cert);\n    sk_X509_NAME_pop_free(a->ca_names, X509_NAME_free);\n    sk_X509_NAME_pop_free(a->client_ca_names, X509_NAME_free);\n    sk_X509_pop_free(a->extra_certs, X509_free);\n    a->comp_methods = NULL;\n#ifndef OPENSSL_NO_SRTP\n    sk_SRTP_PROTECTION_PROFILE_free(a->srtp_profiles);\n#endif\n#ifndef OPENSSL_NO_SRP\n    SSL_CTX_SRP_CTX_free(a);\n#endif\n#ifndef OPENSSL_NO_ENGINE\n    ENGINE_finish(a->client_cert_engine);\n#endif\n#ifndef OPENSSL_NO_EC\n    OPENSSL_free(a->ext.ecpointformats);\n    OPENSSL_free(a->ext.supportedgroups);\n#endif\n    OPENSSL_free(a->ext.alpn);\n    OPENSSL_secure_free(a->ext.secure);\n    CRYPTO_THREAD_lock_free(a->lock);\n    OPENSSL_free(a);\n}', 'static inline int CRYPTO_DOWN_REF(_Atomic int *val, int *ret, void *lock)\n{\n    *ret = atomic_fetch_sub_explicit(val, 1, memory_order_relaxed) - 1;\n    if (*ret == 0)\n        atomic_thread_fence(memory_order_acquire);\n    return 1;\n}']