Avoid a segfault in getblock if it can't read a block from disk. #4501

pull rdponticelli wants to merge 1 commits into bitcoin:master from Criptomonedas:segfaultgetblock changing 1 files +3 −1
  1. rdponticelli commented at 12:50 AM on July 10, 2014: contributor

    No description provided.

  2. jgarzik commented at 1:33 AM on July 10, 2014: contributor

    General concept is OK. Needs minor revisions.

  3. rdponticelli commented at 2:10 AM on July 10, 2014: contributor

    Thanks for the feedback. Revisions done.

  4. Avoid a segfault on getblock if it can't read a block from disk. 954d2e7201
  5. BitcoinPullTester commented at 4:20 AM on July 10, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4501_954d2e7201fcea7a95c5a95be574a8c0a1f16ce1/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  6. laanwj commented at 6:08 AM on July 10, 2014: member

    Code changes look straightforward and correct, haven't tested.

  7. laanwj commented at 3:01 AM on July 11, 2014: member

    Tested:

    • Start bitcoind -testnet
    • mv blk00000.dat blk00000.dat.old
    • getblock 00000000b873e79784647a6c82962c70d228557d24a747ea4d1b8bbe878e1206

    Without patch: Segmentation fault With patch: {"code":-32603,"message":"Can't read block from disk"}

    ACK

  8. laanwj merged this on Jul 11, 2014
  9. laanwj closed this on Jul 11, 2014

  10. laanwj referenced this in commit f0fc81a083 on Jul 11, 2014
  11. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 12:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me