mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Merge branch 'tor-github/pr/1050' into maint-0.4.1
This commit is contained in:
commit
ea14fb136c
5
changes/ticket30686
Normal file
5
changes/ticket30686
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
o Minor features (logging):
|
||||||
|
- Give a more useful assertion failure message if we think we have
|
||||||
|
minherit() but we fail to make a region non-inheritable. Give a
|
||||||
|
compile-time warning if our support for minherit() is
|
||||||
|
incomplete. Closes ticket 30686.
|
@ -181,7 +181,11 @@ crypto_fast_rng_new_from_seed(const uint8_t *seed)
|
|||||||
#else
|
#else
|
||||||
/* We decided above that noinherit would always do _something_. Assert here
|
/* We decided above that noinherit would always do _something_. Assert here
|
||||||
* that we were correct. */
|
* 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 /* defined(CHECK_PID) || ... */
|
#endif /* defined(CHECK_PID) || ... */
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,11 @@
|
|||||||
|
|
||||||
#endif /* defined(HAVE_MINHERIT) || ... */
|
#endif /* defined(HAVE_MINHERIT) || ... */
|
||||||
|
|
||||||
|
#if defined(HAVE_MINHERIT) && !defined(FLAG_ZERO) && !defined(FLAG_NOINHERIT)
|
||||||
|
#warn "minherit() is defined, but we couldn't find the right flag for it."
|
||||||
|
#warn "This is probably a bug in Tor's support for this platform."
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper: try to prevent the <b>sz</b> bytes at <b>mem</b> from being swapped
|
* Helper: try to prevent the <b>sz</b> bytes at <b>mem</b> from being swapped
|
||||||
* to disk. Return 0 on success or if the facility is not available on this
|
* to disk. Return 0 on success or if the facility is not available on this
|
||||||
|
Loading…
Reference in New Issue
Block a user