| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | | - |
| 17 | | - |
| 18 | | - |
| 19 | | - |
| 20 | | - |
| 21 | | - |
| 22 | | - |
| 23 | | - |
| 24 | | - |
| 25 | | - |
| 26 | #include <sys/mman.h> | - |
| 27 | | - |
| 28 | #include <pthread.h> | - |
| 29 | #include <signal.h> | - |
| 30 | | - |
| 31 | static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; | - |
| 32 | #define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx) | - |
| 33 | #define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx) | - |
| 34 | | - |
| 35 | #ifdef __GLIBC__ | - |
| 36 | extern void *__dso_handle; | - |
| 37 | extern int __register_atfork(void (*)(void), void(*)(void), void (*)(void), void *); | - |
| 38 | #define _ARC4_ATFORK(f) __register_atfork(NULL, NULL, (f), __dso_handle) | - |
| 39 | #else | - |
| 40 | #define _ARC4_ATFORK(f) pthread_atfork(NULL, NULL, (f)) | - |
| 41 | #endif | - |
| 42 | | - |
| 43 | static inline void | - |
| 44 | _getentropy_fail(void) | - |
| 45 | { | - |
| 46 | raise(SIGKILL); | - |
| 47 | } never executed: end of block | 0 |
| 48 | | - |
| 49 | static volatile sig_atomic_t _rs_forked; | - |
| 50 | | - |
| 51 | static inline void | - |
| 52 | _rs_forkhandler(void) | - |
| 53 | { | - |
| 54 | _rs_forked = 1; | - |
| 55 | } never executed: end of block | 0 |
| 56 | | - |
| 57 | static inline void | - |
| 58 | _rs_forkdetect(void) | - |
| 59 | { | - |
| 60 | static pid_t _rs_pid = 0; | - |
| 61 | pid_t pid = getpid(); | - |
| 62 | | - |
| 63 | | - |
| 64 | if (_rs_pid == 0 || _rs_pid == 1 || _rs_pid != pid || _rs_forked) {| TRUE | evaluated 182 times by 27 testsEvaluated by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- randtest
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- ...
| | FALSE | evaluated 291159 times by 26 testsEvaluated by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- tlstest
- ...
|
| TRUE | never evaluated | | FALSE | evaluated 291159 times by 26 testsEvaluated by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- tlstest
- ...
|
| TRUE | never evaluated | | FALSE | evaluated 291159 times by 26 testsEvaluated by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- tlstest
- ...
|
| TRUE | never evaluated | | FALSE | evaluated 291159 times by 26 testsEvaluated by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- tlstest
- ...
|
| 0-291159 |
| 65 | _rs_pid = pid; | - |
| 66 | _rs_forked = 0; | - |
| 67 | if (rs)| TRUE | never evaluated | | FALSE | evaluated 182 times by 27 testsEvaluated by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- randtest
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- ...
|
| 0-182 |
| 68 | memset(rs, 0, sizeof(*rs)); never executed: memset(rs, 0, sizeof(*rs)); | 0 |
| 69 | }executed 182 times by 27 tests: end of blockExecuted by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- randtest
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- ...
| 182 |
| 70 | }executed 291341 times by 27 tests: end of blockExecuted by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- randtest
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- ...
| 291341 |
| 71 | | - |
| 72 | static inline int | - |
| 73 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | - |
| 74 | { | - |
| 75 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE,| TRUE | never evaluated | | FALSE | evaluated 182 times by 27 testsEvaluated by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- randtest
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- ...
|
| 0-182 |
| 76 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED)| TRUE | never evaluated | | FALSE | evaluated 182 times by 27 testsEvaluated by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- randtest
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- ...
|
| 0-182 |
| 77 | return (-1); never executed: return (-1); | 0 |
| 78 | | - |
| 79 | if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE,| TRUE | never evaluated | | FALSE | evaluated 182 times by 27 testsEvaluated by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- randtest
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- ...
|
| 0-182 |
| 80 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {| TRUE | never evaluated | | FALSE | evaluated 182 times by 27 testsEvaluated by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- randtest
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- ...
|
| 0-182 |
| 81 | munmap(*rsp, sizeof(**rsp)); | - |
| 82 | *rsp = NULL; | - |
| 83 | return (-1); never executed: return (-1); | 0 |
| 84 | } | - |
| 85 | | - |
| 86 | _ARC4_ATFORK(_rs_forkhandler); | - |
| 87 | return (0);executed 182 times by 27 tests: return (0);Executed by:- arc4randomforktest
- bntest
- cipher_list
- cipherstest
- clienttest
- configtest
- dhtest
- dsatest
- ecdhtest
- ecdsatest
- ectest
- exptest
- igetest
- libcrypto.so.44.0.1
- mont
- pkcs7test
- randtest
- rsa_test
- servertest
- ssl_versions
- ssltest
- timingsafe
- tls_ext_alpn
- tls_prf
- tlsexttest
- ...
| 182 |
| 88 | } | - |
| | |