From: Nick Mathewson Date: Wed, 29 May 2019 13:21:45 +0000 (-0400) Subject: Give a more useful failure messgae when we fail to minherit(). X-Git-Tag: tor-0.4.1.3-alpha~6^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93ddc51cbd325ef3d5cf3a5b9948ff65c09fc5aa;p=thirdparty%2Ftor.git Give a more useful failure messgae when we fail to minherit(). Part of ticket 30686. --- 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; }