Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[wallet] [moveonly] Check non-null pindex before potentially referencing #10265

Merged
merged 1 commit into from Apr 25, 2017

Conversation

Projects
None yet
7 participants
Member

kallewoof commented Apr 23, 2017

The once-a-minute LogPrintf in ScanForWalletTransactions will do a null-ref if it happens to hit the 60s mark right at the last block (where pindex becomes null). This was moved up to the top of the block instead, where the while (pindex && !fAbortRescan) has checked pindex for us.

@fanquake fanquake added the Wallet label Apr 23, 2017

Member

jonasschnelli commented Apr 24, 2017

Nice catch!
utACK 6b816dc

Member

NicolasDorier commented Apr 24, 2017

utACK 6b816dc. I am surprised there were no more bug report about that.

@kallewoof I would go with temptation and move the GetTime() >= nNow check to line 1554 as it is vaguely related to ShowProgress, this could help with readability too.

Member

kallewoof commented Apr 25, 2017

@mchrostowski Did you mean 1545 by any chance?

Contributor

paveljanik commented Apr 25, 2017

Concept ACK
@kallewoof Agree with the move to the top of the block.

Member

kallewoof commented Apr 25, 2017

This PR is now a MOVEONLY. 4 lines moved up to L1547-1550 from L1560-1563.

@kallewoof kallewoof changed the title from [wallet] Check non-null pindex before potentially referencing to [wallet] [moveonly] Check non-null pindex before potentially referencing Apr 25, 2017

Owner

laanwj commented Apr 25, 2017

utACK c36ea69

@laanwj laanwj merged commit c36ea69 into bitcoin:master Apr 25, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Apr 25, 2017

Merge #10265: [wallet] [moveonly] Check non-null pindex before potent…
…ially referencing


c36ea69 [wallet] Make sure pindex is non-null before possibly referencing in LogPrintf call. (Karl-Johan Alm)

Tree-SHA512: a14c9f3e1228bca91977bea821c56a377d80889b41d250050c9be67aa93e460319a7cf1d4b63ee40f23b5a34159590f0e3fe15dc88698dc694c0c8098bd2db4d

@kallewoof kallewoof deleted the kallewoof:fix-check-pindex-scanforwallettx branch Apr 25, 2017

luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Jun 3, 2017

luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Jun 3, 2017

luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Jun 3, 2017

luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Jun 5, 2017

luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Jun 5, 2017

luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Jun 5, 2017

nomnombtc added a commit to nomnombtc/bitcoin that referenced this pull request Jul 17, 2017

runn1ng added a commit to runn1ng/bitcoin that referenced this pull request Oct 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment