HomePhabricator

Exit cleanly if AppInit2 returns false
d605bc4cd137Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Exit cleanly if AppInit2 returns false

Bitcoin-Qt could core dump if application initialization failed in certain ways.

I double-fixed this:

  1. qt/bitcoin.cpp now shuts down core threads cleanly if AppInit2 returns false
  2. init.cpp now exits before StartNode() if strErrors is set (no reason to StartNode if we're just going to exit immediately anyway).

Tested by triggering all of the various ways AppInit2 can fail, either by passing bogus command-line arguments or just recompiling tweaked code to simulate failure.

This is a partial fix for #2480

Details

Provenance
Gavin Andresen <gavinandresen@gmail.com>Authored on May 2 2013, 16:26
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGINGeef2091fe9ee: Merge pull request #2595 from sipa/noannloc
Branches
Unknown
Tags
Unknown

Event Timeline

Gavin Andresen <gavinandresen@gmail.com> committed rSTAGINGd605bc4cd137: Exit cleanly if AppInit2 returns false (authored by Gavin Andresen <gavinandresen@gmail.com>).May 2 2013, 16:26