Inspired by a worried email from somebody reviewing the code.
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-
gavinandresen commented at 4:24 PM on March 5, 2015: contributor
-
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().
- gavinandresen force-pushed the base branch on Mar 5, 2015
-
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.
-
0ce213662b
Make extra super sure RAND_bytes failing == exit
Inspired by a worried email from somebody reviewing the code.
- gavinandresen force-pushed on Mar 5, 2015
-
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.
-
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.
- gavinandresen closed this on Mar 6, 2015
- DrahtBot locked this on Sep 8, 2021