crypto/async/async.c:370: error: MEMORY_LEAK
  memory dynamically allocated to `return` by call to `CRYPTO_zalloc()` at line 333, column 12 is not reachable after line 370, column 5.
Showing all 80 steps of the trace


crypto/async/async.c:316:1: start of procedure ASYNC_init_thread()
314.   }
315.   
316. > int ASYNC_init_thread(size_t max_size, size_t init_size)
317.   {
318.       async_pool *pool;

crypto/async/async.c:319:5: 
317.   {
318.       async_pool *pool;
319. >     size_t curr_size = 0;
320.   
321.       if (init_size > max_size) {

crypto/async/async.c:321:9: Taking false branch
319.       size_t curr_size = 0;
320.   
321.       if (init_size > max_size) {
               ^
322.           ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ASYNC_R_INVALID_POOL_SIZE);
323.           return 0;

crypto/async/async.c:326:10: Taking false branch
324.       }
325.   
326.       if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) {
                ^
327.           return 0;
328.       }

crypto/async/async.c:329:10: Taking false branch
327.           return 0;
328.       }
329.       if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ASYNC)) {
                ^
330.           return 0;
331.       }

crypto/async/async.c:333:5: 
331.       }
332.   
333. >     pool = OPENSSL_zalloc(sizeof *pool);
334.       if (pool == NULL) {
335.           ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ERR_R_MALLOC_FAILURE);

crypto/mem.c:98:1: start of procedure CRYPTO_zalloc()
  96.   }
  97.   
  98. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
  99.   {
  100.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:100:5: 
  98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  99.   {
  100. >     void *ret = CRYPTO_malloc(num, file, line);
  101.   
  102.       if (ret != NULL)

crypto/mem.c:71:1: start of procedure CRYPTO_malloc()
    69.   }
    70.   
    71. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    72.   {
    73.       void *ret = NULL;

crypto/mem.c:73:5: 
    71.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    72.   {
    73. >     void *ret = NULL;
    74.   
    75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:75:9: Taking false branch
    73.       void *ret = NULL;
    74.   
    75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                  ^
    76.           return malloc_impl(num, file, line);
    77.   

crypto/mem.c:78:9: Taking false branch
    76.           return malloc_impl(num, file, line);
    77.   
    78.       if (num <= 0)
                  ^
    79.           return NULL;
    80.   

crypto/mem.c:81:5: 
    79.           return NULL;
    80.   
    81. >     allow_customize = 0;
    82.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    83.       if (call_malloc_debug) {

crypto/mem.c:91:5: 
    89.       }
    90.   #else
    91. >     osslargused(file); osslargused(line);
    92.       ret = malloc(num);
    93.   #endif

crypto/mem.c:91:24: 
    89.       }
    90.   #else
    91. >     osslargused(file); osslargused(line);
    92.       ret = malloc(num);
    93.   #endif

crypto/mem.c:92:5: 
    90.   #else
    91.       osslargused(file); osslargused(line);
    92. >     ret = malloc(num);
    93.   #endif
    94.   

crypto/mem.c:95:5: 
    93.   #endif
    94.   
    95. >     return ret;
    96.   }
    97.   

crypto/mem.c:96:1: return from a call to CRYPTO_malloc
    94.   
    95.       return ret;
    96. > }
    97.   
    98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:102:9: Taking true branch
  100.       void *ret = CRYPTO_malloc(num, file, line);
  101.   
  102.       if (ret != NULL)
                 ^
  103.           memset(ret, 0, num);
  104.       return ret;

crypto/mem.c:103:9: 
  101.   
  102.       if (ret != NULL)
  103. >         memset(ret, 0, num);
  104.       return ret;
  105.   }

crypto/mem.c:104:5: 
  102.       if (ret != NULL)
  103.           memset(ret, 0, num);
  104. >     return ret;
  105.   }
  106.   

crypto/mem.c:105:1: return from a call to CRYPTO_zalloc
  103.           memset(ret, 0, num);
  104.       return ret;
  105. > }
  106.   
  107.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/async/async.c:334:9: Taking false branch
332.   
333.       pool = OPENSSL_zalloc(sizeof *pool);
334.       if (pool == NULL) {
               ^
335.           ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ERR_R_MALLOC_FAILURE);
336.           return 0;

crypto/async/async.c:339:5: 
337.       }
338.   
339. >     pool->jobs = sk_ASYNC_JOB_new_null();
340.       if (pool->jobs == NULL) {
341.           ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ERR_R_MALLOC_FAILURE);

crypto/async/async_locl.h:64:1: start of procedure sk_ASYNC_JOB_new_null()
  62.   };
  63.   
  64. > DEFINE_STACK_OF(ASYNC_JOB)
  65.   
  66.   struct async_pool_st {

crypto/stack/stack.c:92:1: start of procedure OPENSSL_sk_new_null()
    90.   }
    91.   
    92. > OPENSSL_STACK *OPENSSL_sk_new_null(void)
    93.   {
    94.       return OPENSSL_sk_new((OPENSSL_sk_compfunc)NULL);

crypto/stack/stack.c:94:5: Skipping OPENSSL_sk_new(): empty list of specs
    92.   OPENSSL_STACK *OPENSSL_sk_new_null(void)
    93.   {
    94.       return OPENSSL_sk_new((OPENSSL_sk_compfunc)NULL);
              ^
    95.   }
    96.   

crypto/stack/stack.c:95:1: return from a call to OPENSSL_sk_new_null
    93.   {
    94.       return OPENSSL_sk_new((OPENSSL_sk_compfunc)NULL);
    95. > }
    96.   
    97.   OPENSSL_STACK *OPENSSL_sk_new(OPENSSL_sk_compfunc c)

crypto/async/async_locl.h:64:1: return from a call to sk_ASYNC_JOB_new_null
  62.   };
  63.   
  64. > DEFINE_STACK_OF(ASYNC_JOB)
  65.   
  66.   struct async_pool_st {

crypto/async/async.c:340:9: Taking false branch
338.   
339.       pool->jobs = sk_ASYNC_JOB_new_null();
340.       if (pool->jobs == NULL) {
               ^
341.           ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ERR_R_MALLOC_FAILURE);
342.           OPENSSL_free(pool);

crypto/async/async.c:346:5: 
344.       }
345.   
346. >     pool->max_size = max_size;
347.   
348.       /* Pre-create jobs as required */

crypto/async/async.c:349:12: Loop condition is true. Entering loop body
347.   
348.       /* Pre-create jobs as required */
349.       while (init_size--) {
                  ^
350.           ASYNC_JOB *job;
351.           job = async_job_new();

crypto/async/async.c:351:9: Skipping async_job_new(): empty list of specs
349.       while (init_size--) {
350.           ASYNC_JOB *job;
351.           job = async_job_new();
               ^
352.           if (job == NULL || !async_fibre_makecontext(&job->fibrectx)) {
353.               /*

crypto/async/async.c:352:13: Taking false branch
350.           ASYNC_JOB *job;
351.           job = async_job_new();
352.           if (job == NULL || !async_fibre_makecontext(&job->fibrectx)) {
                   ^
353.               /*
354.                * Not actually fatal because we already created the pool, just

crypto/async/async.c:352:29: 
350.           ASYNC_JOB *job;
351.           job = async_job_new();
352. >         if (job == NULL || !async_fibre_makecontext(&job->fibrectx)) {
353.               /*
354.                * Not actually fatal because we already created the pool, just

crypto/async/arch/async_posix.c:35:1: start of procedure async_fibre_makecontext()
  33.   }
  34.   
  35. > int async_fibre_makecontext(async_fibre *fibre)
  36.   {
  37.       fibre->env_init = 0;

crypto/async/arch/async_posix.c:37:5: 
  35.   int async_fibre_makecontext(async_fibre *fibre)
  36.   {
  37. >     fibre->env_init = 0;
  38.       if (getcontext(&fibre->fibre) == 0) {
  39.           fibre->fibre.uc_stack.ss_sp = OPENSSL_malloc(STACKSIZE);

crypto/async/arch/async_posix.c:38:9: Taking true branch
  36.   {
  37.       fibre->env_init = 0;
  38.       if (getcontext(&fibre->fibre) == 0) {
                ^
  39.           fibre->fibre.uc_stack.ss_sp = OPENSSL_malloc(STACKSIZE);
  40.           if (fibre->fibre.uc_stack.ss_sp != NULL) {

crypto/async/arch/async_posix.c:39:9: 
  37.       fibre->env_init = 0;
  38.       if (getcontext(&fibre->fibre) == 0) {
  39. >         fibre->fibre.uc_stack.ss_sp = OPENSSL_malloc(STACKSIZE);
  40.           if (fibre->fibre.uc_stack.ss_sp != NULL) {
  41.               fibre->fibre.uc_stack.ss_size = STACKSIZE;

crypto/mem.c:71:1: start of procedure CRYPTO_malloc()
    69.   }
    70.   
    71. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    72.   {
    73.       void *ret = NULL;

crypto/mem.c:73:5: 
    71.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    72.   {
    73. >     void *ret = NULL;
    74.   
    75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:75:9: Taking true branch
    73.       void *ret = NULL;
    74.   
    75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                  ^
    76.           return malloc_impl(num, file, line);
    77.   

crypto/mem.c:75:32: Taking true branch
    73.       void *ret = NULL;
    74.   
    75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                                         ^
    76.           return malloc_impl(num, file, line);
    77.   

crypto/mem.c:76:9: Skipping __function_pointer__(): unresolved function pointer
    74.   
    75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
    76.           return malloc_impl(num, file, line);
                  ^
    77.   
    78.       if (num <= 0)

crypto/mem.c:96:1: return from a call to CRYPTO_malloc
    94.   
    95.       return ret;
    96. > }
    97.   
    98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/async/arch/async_posix.c:40:13: Taking true branch
  38.       if (getcontext(&fibre->fibre) == 0) {
  39.           fibre->fibre.uc_stack.ss_sp = OPENSSL_malloc(STACKSIZE);
  40.           if (fibre->fibre.uc_stack.ss_sp != NULL) {
                    ^
  41.               fibre->fibre.uc_stack.ss_size = STACKSIZE;
  42.               fibre->fibre.uc_link = NULL;

crypto/async/arch/async_posix.c:41:13: 
  39.           fibre->fibre.uc_stack.ss_sp = OPENSSL_malloc(STACKSIZE);
  40.           if (fibre->fibre.uc_stack.ss_sp != NULL) {
  41. >             fibre->fibre.uc_stack.ss_size = STACKSIZE;
  42.               fibre->fibre.uc_link = NULL;
  43.               makecontext(&fibre->fibre, async_start_func, 0);

crypto/async/arch/async_posix.c:42:13: 
  40.           if (fibre->fibre.uc_stack.ss_sp != NULL) {
  41.               fibre->fibre.uc_stack.ss_size = STACKSIZE;
  42. >             fibre->fibre.uc_link = NULL;
  43.               makecontext(&fibre->fibre, async_start_func, 0);
  44.               return 1;

crypto/async/arch/async_posix.c:43:13: Skipping makecontext(): method has no implementation
  41.               fibre->fibre.uc_stack.ss_size = STACKSIZE;
  42.               fibre->fibre.uc_link = NULL;
  43.               makecontext(&fibre->fibre, async_start_func, 0);
                    ^
  44.               return 1;
  45.           }

crypto/async/arch/async_posix.c:44:13: 
  42.               fibre->fibre.uc_link = NULL;
  43.               makecontext(&fibre->fibre, async_start_func, 0);
  44. >             return 1;
  45.           }
  46.       } else {

crypto/async/arch/async_posix.c:50:1: return from a call to async_fibre_makecontext
  48.       }
  49.       return 0;
  50. > }
  51.   
  52.   void async_fibre_free(async_fibre *fibre)

crypto/async/async.c:352:29: Taking false branch
350.           ASYNC_JOB *job;
351.           job = async_job_new();
352.           if (job == NULL || !async_fibre_makecontext(&job->fibrectx)) {
                                   ^
353.               /*
354.                * Not actually fatal because we already created the pool, just

crypto/async/async.c:360:9: 
358.               break;
359.           }
360. >         job->funcargs = NULL;
361.           sk_ASYNC_JOB_push(pool->jobs, job);
362.           curr_size++;

crypto/async/async.c:361:9: 
359.           }
360.           job->funcargs = NULL;
361. >         sk_ASYNC_JOB_push(pool->jobs, job);
362.           curr_size++;
363.       }

crypto/async/async_locl.h:64:1: start of procedure sk_ASYNC_JOB_push()
  62.   };
  63.   
  64. > DEFINE_STACK_OF(ASYNC_JOB)
  65.   
  66.   struct async_pool_st {

crypto/stack/stack.c:200:1: start of procedure OPENSSL_sk_push()
    198.   }
    199.   
    200. > int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data)
    201.   {
    202.       return (OPENSSL_sk_insert(st, data, st->num));

crypto/stack/stack.c:202:5: Skipping OPENSSL_sk_insert(): empty list of specs
    200.   int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data)
    201.   {
    202.       return (OPENSSL_sk_insert(st, data, st->num));
               ^
    203.   }
    204.   

crypto/stack/stack.c:203:1: return from a call to OPENSSL_sk_push
    201.   {
    202.       return (OPENSSL_sk_insert(st, data, st->num));
    203. > }
    204.   
    205.   int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data)

crypto/async/async_locl.h:64:1: return from a call to sk_ASYNC_JOB_push
  62.   };
  63.   
  64. > DEFINE_STACK_OF(ASYNC_JOB)
  65.   
  66.   struct async_pool_st {

crypto/async/async.c:362:9: 
360.           job->funcargs = NULL;
361.           sk_ASYNC_JOB_push(pool->jobs, job);
362. >         curr_size++;
363.       }
364.       pool->curr_size = curr_size;

crypto/async/async.c:349:12: Loop condition is true. Entering loop body
347.   
348.       /* Pre-create jobs as required */
349.       while (init_size--) {
                  ^
350.           ASYNC_JOB *job;
351.           job = async_job_new();

crypto/async/async.c:351:9: Skipping async_job_new(): empty list of specs
349.       while (init_size--) {
350.           ASYNC_JOB *job;
351.           job = async_job_new();
               ^
352.           if (job == NULL || !async_fibre_makecontext(&job->fibrectx)) {
353.               /*

crypto/async/async.c:352:13: Taking false branch
350.           ASYNC_JOB *job;
351.           job = async_job_new();
352.           if (job == NULL || !async_fibre_makecontext(&job->fibrectx)) {
                   ^
353.               /*
354.                * Not actually fatal because we already created the pool, just

crypto/async/async.c:352:29: 
350.           ASYNC_JOB *job;
351.           job = async_job_new();
352. >         if (job == NULL || !async_fibre_makecontext(&job->fibrectx)) {
353.               /*
354.                * Not actually fatal because we already created the pool, just

crypto/async/arch/async_posix.c:35:1: start of procedure async_fibre_makecontext()
  33.   }
  34.   
  35. > int async_fibre_makecontext(async_fibre *fibre)
  36.   {
  37.       fibre->env_init = 0;

crypto/async/arch/async_posix.c:37:5: 
  35.   int async_fibre_makecontext(async_fibre *fibre)
  36.   {
  37. >     fibre->env_init = 0;
  38.       if (getcontext(&fibre->fibre) == 0) {
  39.           fibre->fibre.uc_stack.ss_sp = OPENSSL_malloc(STACKSIZE);

crypto/async/arch/async_posix.c:38:9: Taking false branch
  36.   {
  37.       fibre->env_init = 0;
  38.       if (getcontext(&fibre->fibre) == 0) {
                ^
  39.           fibre->fibre.uc_stack.ss_sp = OPENSSL_malloc(STACKSIZE);
  40.           if (fibre->fibre.uc_stack.ss_sp != NULL) {

crypto/async/arch/async_posix.c:47:9: 
  45.           }
  46.       } else {
  47. >         fibre->fibre.uc_stack.ss_sp = NULL;
  48.       }
  49.       return 0;

crypto/async/arch/async_posix.c:49:5: 
  47.           fibre->fibre.uc_stack.ss_sp = NULL;
  48.       }
  49. >     return 0;
  50.   }
  51.   

crypto/async/arch/async_posix.c:50:1: return from a call to async_fibre_makecontext
  48.       }
  49.       return 0;
  50. > }
  51.   
  52.   void async_fibre_free(async_fibre *fibre)

crypto/async/async.c:352:29: Taking true branch
350.           ASYNC_JOB *job;
351.           job = async_job_new();
352.           if (job == NULL || !async_fibre_makecontext(&job->fibrectx)) {
                                   ^
353.               /*
354.                * Not actually fatal because we already created the pool, just

crypto/async/async.c:357:13: 
355.                * skip creation of any more jobs
356.                */
357. >             async_job_free(job);
358.               break;
359.           }

crypto/async/async.c:364:5: 
362.           curr_size++;
363.       }
364. >     pool->curr_size = curr_size;
365.       if (!CRYPTO_THREAD_set_local(&poolkey, pool)) {
366.           ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ASYNC_R_FAILED_TO_SET_POOL);

crypto/async/async.c:365:10: 
363.       }
364.       pool->curr_size = curr_size;
365. >     if (!CRYPTO_THREAD_set_local(&poolkey, pool)) {
366.           ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ASYNC_R_FAILED_TO_SET_POOL);
367.           goto err;

crypto/threads_pthread.c:84:1: start of procedure CRYPTO_THREAD_set_local()
  82.   }
  83.   
  84. > int CRYPTO_THREAD_set_local(CRYPTO_THREAD_LOCAL *key, void *val)
  85.   {
  86.       if (pthread_setspecific(*key, val) != 0)

crypto/threads_pthread.c:86:9: Taking false branch
  84.   int CRYPTO_THREAD_set_local(CRYPTO_THREAD_LOCAL *key, void *val)
  85.   {
  86.       if (pthread_setspecific(*key, val) != 0)
                ^
  87.           return 0;
  88.   

crypto/threads_pthread.c:89:5: 
  87.           return 0;
  88.   
  89. >     return 1;
  90.   }
  91.   

crypto/threads_pthread.c:90:1: return from a call to CRYPTO_THREAD_set_local
  88.   
  89.       return 1;
  90. > }
  91.   
  92.   int CRYPTO_THREAD_cleanup_local(CRYPTO_THREAD_LOCAL *key)

crypto/async/async.c:365:10: Taking false branch
363.       }
364.       pool->curr_size = curr_size;
365.       if (!CRYPTO_THREAD_set_local(&poolkey, pool)) {
                ^
366.           ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ASYNC_R_FAILED_TO_SET_POOL);
367.           goto err;

crypto/async/async.c:370:5: 
368.       }
369.   
370. >     return 1;
371.   err:
372.       async_free_pool_internal(pool);

int ASYNC_init_thread(size_t max_size, size_t init_size)
{
    async_pool *pool;
    size_t curr_size = 0;
    if (init_size > max_size) {
        ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ASYNC_R_INVALID_POOL_SIZE);
        return 0;
    }
    if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) {
        return 0;
    }
    if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ASYNC)) {
        return 0;
    }
    pool = OPENSSL_zalloc(sizeof *pool);
    if (pool == NULL) {
        ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ERR_R_MALLOC_FAILURE);
        return 0;
    }
    pool->jobs = sk_ASYNC_JOB_new_null();
    if (pool->jobs == NULL) {
        ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ERR_R_MALLOC_FAILURE);
        OPENSSL_free(pool);
        return 0;
    }
    pool->max_size = max_size;
    while (init_size--) {
        ASYNC_JOB *job;
        job = async_job_new();
        if (job == NULL || !async_fibre_makecontext(&job->fibrectx)) {
            async_job_free(job);
            break;
        }
        job->funcargs = NULL;
        sk_ASYNC_JOB_push(pool->jobs, job);
        curr_size++;
    }
    pool->curr_size = curr_size;
    if (!CRYPTO_THREAD_set_local(&poolkey, pool)) {
        ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ASYNC_R_FAILED_TO_SET_POOL);
        goto err;
    }
    return 1;
err:
    async_free_pool_internal(pool);
    return 0;
}
['int ASYNC_init_thread(size_t max_size, size_t init_size)\n{\n    async_pool *pool;\n    size_t curr_size = 0;\n    if (init_size > max_size) {\n        ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ASYNC_R_INVALID_POOL_SIZE);\n        return 0;\n    }\n    if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL)) {\n        return 0;\n    }\n    if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ASYNC)) {\n        return 0;\n    }\n    pool = OPENSSL_zalloc(sizeof *pool);\n    if (pool == NULL) {\n        ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ERR_R_MALLOC_FAILURE);\n        return 0;\n    }\n    pool->jobs = sk_ASYNC_JOB_new_null();\n    if (pool->jobs == NULL) {\n        ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ERR_R_MALLOC_FAILURE);\n        OPENSSL_free(pool);\n        return 0;\n    }\n    pool->max_size = max_size;\n    while (init_size--) {\n        ASYNC_JOB *job;\n        job = async_job_new();\n        if (job == NULL || !async_fibre_makecontext(&job->fibrectx)) {\n            async_job_free(job);\n            break;\n        }\n        job->funcargs = NULL;\n        sk_ASYNC_JOB_push(pool->jobs, job);\n        curr_size++;\n    }\n    pool->curr_size = curr_size;\n    if (!CRYPTO_THREAD_set_local(&poolkey, pool)) {\n        ASYNCerr(ASYNC_F_ASYNC_INIT_THREAD, ASYNC_R_FAILED_TO_SET_POOL);\n        goto err;\n    }\n    return 1;\nerr:\n    async_free_pool_internal(pool);\n    return 0;\n}', 'void *CRYPTO_zalloc(size_t num, const char *file, int line)\n{\n    void *ret = CRYPTO_malloc(num, file, line);\n    if (ret != NULL)\n        memset(ret, 0, num);\n    return ret;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)\n        return malloc_impl(num, file, line);\n    if (num <= 0)\n        return NULL;\n    allow_customize = 0;\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);\n        ret = malloc(num);\n        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);\n    } else {\n        ret = malloc(num);\n    }\n#else\n    osslargused(file); osslargused(line);\n    ret = malloc(num);\n#endif\n    return ret;\n}', 'DEFINE_STACK_OF(ASYNC_JOB)', 'OPENSSL_STACK *OPENSSL_sk_new_null(void)\n{\n    return OPENSSL_sk_new((OPENSSL_sk_compfunc)NULL);\n}', 'int async_fibre_makecontext(async_fibre *fibre)\n{\n    fibre->env_init = 0;\n    if (getcontext(&fibre->fibre) == 0) {\n        fibre->fibre.uc_stack.ss_sp = OPENSSL_malloc(STACKSIZE);\n        if (fibre->fibre.uc_stack.ss_sp != NULL) {\n            fibre->fibre.uc_stack.ss_size = STACKSIZE;\n            fibre->fibre.uc_link = NULL;\n            makecontext(&fibre->fibre, async_start_func, 0);\n            return 1;\n        }\n    } else {\n        fibre->fibre.uc_stack.ss_sp = NULL;\n    }\n    return 0;\n}', 'int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data)\n{\n    return (OPENSSL_sk_insert(st, data, st->num));\n}', 'int CRYPTO_THREAD_set_local(CRYPTO_THREAD_LOCAL *key, void *val)\n{\n    if (pthread_setspecific(*key, val) != 0)\n        return 0;\n    return 1;\n}']