wallet: Set encrypted_batch to nullptr after delete. Avoid double free in the case of NDEBUG. #14138

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:set-to-nullptr-after-delete changing 1 files +2 −0
  1. practicalswift commented at 1:43 pm on September 3, 2018: contributor
    Set encrypted_batch to nullptr after delete. Avoid double free in the case of NDEBUG.
  2. wallet: Set encrypted_batch to nullptr after delete. Avoid double free in the case of NDEBUG. fa462b3657
  3. fanquake added the label Wallet on Sep 3, 2018
  4. domob1812 commented at 3:51 pm on September 3, 2018: contributor

    utACK fa462b365715928d2c6eb52ca6a448f367084f0f.

    I wonder, though: Are we “explicitly” supporting running a binary compiled with NDEBUG? If so, then we should probably not use assert(false) in the two places here (and instead explicitly print an error message and exit using other means).

  5. gmaxwell commented at 4:03 pm on September 3, 2018: contributor
    @domob1812 We explicitly do not support that, but at the same time the code should not contain strange bugs when run that way. This is not an argument against assert(false)– that should be used to protect invariants where if violated potentially things would happen elsewhere.
  6. domob1812 commented at 4:06 pm on September 3, 2018: contributor
    @gmaxwell: Thanks for the clarification, that makes sense. I agree that we should still fix bugs like this.
  7. DrahtBot commented at 10:45 am on September 4, 2018: member
    • #14144 (Refactoring: Clarify code using encrypted_batch in CWallet by domob1812)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  8. laanwj commented at 3:59 pm on September 10, 2018: member
    utACK fa462b365715928d2c6eb52ca6a448f367084f0f
  9. ken2812221 referenced this in commit 6eeac2e628 on Sep 10, 2018
  10. laanwj merged this on Sep 10, 2018
  11. laanwj closed this on Sep 10, 2018

  12. practicalswift deleted the branch on Apr 10, 2021
  13. PastaPastaPasta referenced this in commit 5d4f73523a on Jun 27, 2021
  14. PastaPastaPasta referenced this in commit a4762be1f0 on Jun 28, 2021
  15. PastaPastaPasta referenced this in commit 37d60ce757 on Jun 29, 2021
  16. PastaPastaPasta referenced this in commit 1d37f75cd1 on Jul 1, 2021
  17. gades referenced this in commit 72060b1c5a on Apr 18, 2022
  18. DrahtBot locked this on Aug 18, 2022

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: 2024-10-04 22:12 UTC

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