diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-05-29 09:21:45 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2019-06-11 11:29:23 -0400 |
commit | 93ddc51cbd325ef3d5cf3a5b9948ff65c09fc5aa (patch) | |
tree | c272a60c7ac7b74ae7d577de95194febdb9c6878 /src/lib | |
parent | 24a2352d56d807320c45fcdd8c74435bda4302c2 (diff) | |
download | tor-93ddc51cbd325ef3d5cf3a5b9948ff65c09fc5aa.tar.gz tor-93ddc51cbd325ef3d5cf3a5b9948ff65c09fc5aa.zip |
Give a more useful failure messgae when we fail to minherit().
Part of ticket 30686.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/crypt_ops/crypto_rand_fast.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/crypt_ops/crypto_rand_fast.c b/src/lib/crypt_ops/crypto_rand_fast.c index b71ade81bd..d2ce1a542f 100644 --- a/src/lib/crypt_ops/crypto_rand_fast.c +++ b/src/lib/crypt_ops/crypto_rand_fast.c @@ -181,7 +181,11 @@ crypto_fast_rng_new_from_seed(const uint8_t *seed) #else /* We decided above that noinherit would always do _something_. Assert here * that we were correct. */ - tor_assert(inherit != INHERIT_RES_KEEP); + tor_assertf(inherit != INHERIT_RES_KEEP, + "We failed to create a non-inheritable memory region, even " + "though we believed such a failure to be impossible! This is " + "probably a bug in Tor support for your platform; please report " + "it."); #endif return result; } |