crypto/err/err.c:703: error: NULL_DEREFERENCE
  pointer `null` is dereferenced by call to `ossl_init_thread_start()` at line 703, column 14.
Showing all 28 steps of the trace


crypto/err/err.c:679:1: start of procedure ERR_get_state()
677.   }
678.   
679. > ERR_STATE *ERR_get_state(void)
680.   {
681.       ERR_STATE *state;

crypto/err/err.c:682:5: 
680.   {
681.       ERR_STATE *state;
682. >     int saveerrno = get_last_sys_error();
683.   
684.       if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))

crypto/err/err.c:684:10: Taking false branch
682.       int saveerrno = get_last_sys_error();
683.   
684.       if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
                ^
685.           return NULL;
686.   

crypto/err/err.c:687:10: 
685.           return NULL;
686.   
687. >     if (!RUN_ONCE(&err_init, err_do_init))
688.           return NULL;
689.   

crypto/threads_pthread.c:111:1: start of procedure CRYPTO_THREAD_run_once()
  109.   }
  110.   
  111. > int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))
  112.   {
  113.       if (pthread_once(once, init) != 0)

crypto/threads_pthread.c:113:9: Taking false branch
  111.   int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))
  112.   {
  113.       if (pthread_once(once, init) != 0)
                 ^
  114.           return 0;
  115.   

crypto/threads_pthread.c:116:5: 
  114.           return 0;
  115.   
  116. >     return 1;
  117.   }
  118.   

crypto/threads_pthread.c:117:1: return from a call to CRYPTO_THREAD_run_once
  115.   
  116.       return 1;
  117. > }
  118.   
  119.   int CRYPTO_THREAD_init_local(CRYPTO_THREAD_LOCAL *key, void (*cleanup)(void *))

crypto/err/err.c:687:10: Condition is true
685.           return NULL;
686.   
687.       if (!RUN_ONCE(&err_init, err_do_init))
                ^
688.           return NULL;
689.   

crypto/err/err.c:687:10: Taking false branch
685.           return NULL;
686.   
687.       if (!RUN_ONCE(&err_init, err_do_init))
                ^
688.           return NULL;
689.   

crypto/err/err.c:690:5: 
688.           return NULL;
689.   
690. >     state = CRYPTO_THREAD_get_local(&err_thread_local);
691.       if (state == (ERR_STATE*)-1)
692.           return NULL;

crypto/threads_pthread.c:127:1: start of procedure CRYPTO_THREAD_get_local()
  125.   }
  126.   
  127. > void *CRYPTO_THREAD_get_local(CRYPTO_THREAD_LOCAL *key)
  128.   {
  129.       return pthread_getspecific(*key);

crypto/threads_pthread.c:129:5: Skipping pthread_getspecific(): method has no implementation
  127.   void *CRYPTO_THREAD_get_local(CRYPTO_THREAD_LOCAL *key)
  128.   {
  129.       return pthread_getspecific(*key);
             ^
  130.   }
  131.   

crypto/threads_pthread.c:130:1: return from a call to CRYPTO_THREAD_get_local
  128.   {
  129.       return pthread_getspecific(*key);
  130. > }
  131.   
  132.   int CRYPTO_THREAD_set_local(CRYPTO_THREAD_LOCAL *key, void *val)

crypto/err/err.c:691:9: Taking false branch
689.   
690.       state = CRYPTO_THREAD_get_local(&err_thread_local);
691.       if (state == (ERR_STATE*)-1)
               ^
692.           return NULL;
693.   

crypto/err/err.c:694:9: Taking true branch
692.           return NULL;
693.   
694.       if (state == NULL) {
               ^
695.           if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1))
696.               return NULL;

crypto/err/err.c:695:14: 
693.   
694.       if (state == NULL) {
695. >         if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1))
696.               return NULL;
697.   

crypto/threads_pthread.c:132:1: start of procedure CRYPTO_THREAD_set_local()
  130.   }
  131.   
  132. > int CRYPTO_THREAD_set_local(CRYPTO_THREAD_LOCAL *key, void *val)
  133.   {
  134.       if (pthread_setspecific(*key, val) != 0)

crypto/threads_pthread.c:134:9: Taking false branch
  132.   int CRYPTO_THREAD_set_local(CRYPTO_THREAD_LOCAL *key, void *val)
  133.   {
  134.       if (pthread_setspecific(*key, val) != 0)
                 ^
  135.           return 0;
  136.   

crypto/threads_pthread.c:137:5: 
  135.           return 0;
  136.   
  137. >     return 1;
  138.   }
  139.   

crypto/threads_pthread.c:138:1: return from a call to CRYPTO_THREAD_set_local
  136.   
  137.       return 1;
  138. > }
  139.   
  140.   int CRYPTO_THREAD_cleanup_local(CRYPTO_THREAD_LOCAL *key)

crypto/err/err.c:695:14: Taking false branch
693.   
694.       if (state == NULL) {
695.           if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1))
                    ^
696.               return NULL;
697.   

crypto/err/err.c:698:13: 
696.               return NULL;
697.   
698. >         if ((state = OPENSSL_zalloc(sizeof(*state))) == NULL) {
699.               CRYPTO_THREAD_set_local(&err_thread_local, NULL);
700.               return NULL;

providers/fips/fipsprov.c:460:1: start of procedure CRYPTO_zalloc()
  458.   }
  459.   
  460. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
  461.   {
  462.       return c_CRYPTO_zalloc(num, file, line);

providers/fips/fipsprov.c:462:5: Skipping __function_pointer__(): unresolved function pointer
  460.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  461.   {
  462.       return c_CRYPTO_zalloc(num, file, line);
             ^
  463.   }
  464.   

providers/fips/fipsprov.c:463:1: return from a call to CRYPTO_zalloc
  461.   {
  462.       return c_CRYPTO_zalloc(num, file, line);
  463. > }
  464.   
  465.   void CRYPTO_free(void *ptr, const char *file, int line)

crypto/err/err.c:698:13: Taking false branch
696.               return NULL;
697.   
698.           if ((state = OPENSSL_zalloc(sizeof(*state))) == NULL) {
                   ^
699.               CRYPTO_THREAD_set_local(&err_thread_local, NULL);
700.               return NULL;

crypto/err/err.c:703:14: 
701.           }
702.   
703. >         if (!ossl_init_thread_start(NULL, NULL, err_delete_thread_state)
704.                   || !CRYPTO_THREAD_set_local(&err_thread_local, state)) {
705.               ERR_STATE_free(state);

ERR_STATE *ERR_get_state(void)
{
    ERR_STATE *state;
    int saveerrno = get_last_sys_error();
    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
        return NULL;
    if (!RUN_ONCE(&err_init, err_do_init))
        return NULL;
    state = CRYPTO_THREAD_get_local(&err_thread_local);
    if (state == (ERR_STATE*)-1)
        return NULL;
    if (state == NULL) {
        if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1))
            return NULL;
        if ((state = OPENSSL_zalloc(sizeof(*state))) == NULL) {
            CRYPTO_THREAD_set_local(&err_thread_local, NULL);
            return NULL;
        }
        if (!ossl_init_thread_start(NULL, NULL, err_delete_thread_state)
                || !CRYPTO_THREAD_set_local(&err_thread_local, state)) {
            ERR_STATE_free(state);
            CRYPTO_THREAD_set_local(&err_thread_local, NULL);
            return NULL;
        }
        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
    }
    set_sys_error(saveerrno);
    return state;
}
['ERR_STATE *ERR_get_state(void)\n{\n    ERR_STATE *state;\n    int saveerrno = get_last_sys_error();\n    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))\n        return NULL;\n    if (!RUN_ONCE(&err_init, err_do_init))\n        return NULL;\n    state = CRYPTO_THREAD_get_local(&err_thread_local);\n    if (state == (ERR_STATE*)-1)\n        return NULL;\n    if (state == NULL) {\n        if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1))\n            return NULL;\n        if ((state = OPENSSL_zalloc(sizeof(*state))) == NULL) {\n            CRYPTO_THREAD_set_local(&err_thread_local, NULL);\n            return NULL;\n        }\n        if (!ossl_init_thread_start(NULL, NULL, err_delete_thread_state)\n                || !CRYPTO_THREAD_set_local(&err_thread_local, state)) {\n            ERR_STATE_free(state);\n            CRYPTO_THREAD_set_local(&err_thread_local, NULL);\n            return NULL;\n        }\n        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);\n    }\n    set_sys_error(saveerrno);\n    return state;\n}', 'int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))\n{\n    if (pthread_once(once, init) != 0)\n        return 0;\n    return 1;\n}', 'void *CRYPTO_THREAD_get_local(CRYPTO_THREAD_LOCAL *key)\n{\n    return pthread_getspecific(*key);\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}', 'void *CRYPTO_zalloc(size_t num, const char *file, int line)\n{\n    return c_CRYPTO_zalloc(num, file, line);\n}']