Auto merge of #3193 - str4d:b9856-badalloc-terminate, r=bitcartel

Terminate immediately when allocation fails

Backport of bitcoin/bitcoin#9856

Closes #1498.
This commit is contained in:
Homu
2018-05-01 02:09:51 -07:00
4 changed files with 27 additions and 0 deletions

View File

@@ -828,6 +828,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
signal(SIGPIPE, SIG_IGN);
#endif
std::set_new_handler(new_handler_terminate);
// ********************************************************* Step 2: parameter interactions
const CChainParams& chainparams = Params();