Make extra super sure RAND_bytes failing == exit #5854

pull gavinandresen wants to merge 1 commits into bitcoin:master from gavinandresen:random_belt_and_suspenders changing 1 files +2 −1
  1. gavinandresen commented at 4:24 PM on March 5, 2015: contributor

    Inspired by a worried email from somebody reviewing the code.

  2. gmaxwell commented at 4:29 PM on March 5, 2015: contributor

    There are a number of other assert(falses) that should get exit()s by that metric; that is part of why the code still refuses to compile with NDEBUG. I'd rather replace the assert.h macro with our own that is guaranteed to quit; and end the constant repetition of issues around assert().

  3. gavinandresen force-pushed the base branch on Mar 5, 2015
  4. gavinandresen commented at 5:36 PM on March 5, 2015: contributor

    @gmaxwell : okey dokey, "perfect enemy of the better"... I don't care enough to write a proper assert() replacement, but if you do, then please write a patch.

    Until then, I think this should be pulled.

  5. Make extra super sure RAND_bytes failing == exit
    Inspired by a worried email from somebody reviewing the
    code.
    0ce213662b
  6. gavinandresen force-pushed on Mar 5, 2015
  7. gmaxwell commented at 5:47 PM on March 5, 2015: contributor

    Already working on it. Independently, I don't think this should be pulled: All it's going to result in is more panicked email which is confused about how assert works in the codebase. I am tired of it. We had another round of that a week ago.

  8. laanwj commented at 2:18 PM on March 6, 2015: member

    All it's going to result in is more panicked email which is confused about how assert works in the codebase

    I agree.. This solves nothing and may 'confirm' irrational panic. A) as it is, openssl rand will never fail, so this case isn't important B) building with NDEBUG is explicitly forbidden, and until we replace assert (which is worthwhile) it will result in problems in other places.

    This won't make anything worse, but it just seems unnecessary.

  9. gavinandresen closed this on Mar 6, 2015

  10. DrahtBot 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 15:15 UTC

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