firo icon indicating copy to clipboard operation
firo copied to clipboard

Warnings as errors?

Open JadenGeller opened this issue 9 years ago • 4 comments

I just came across the blogpost about the == bug. As an outside observer, it seems like such an exploit could have been avoided if no warnings were checked into the codebase. Do you think it might be a good idea to use the -Werror option to turn warnings into errors during compilation to ensure this doesn't happen in the future? Obviously this would require fixing (presumably) other warnings in the codebase, but it is probably worthwhile in the end.

JadenGeller avatar Mar 07 '17 05:03 JadenGeller

It's actually a good suggestion. Thanks.

aizensou avatar Mar 16 '17 08:03 aizensou

@reubenyap Did y'all implement this suggestion? If not, how do y'all plan to ensure similar bugs don't occur in the future?

JadenGeller avatar Sep 20 '17 07:09 JadenGeller

i'll check with @aizensou and @snguyen-vn on this. The new codebase is much cleaner and after doing a bunch of fixes we will do another code cleanup and then do an audit. This is currently underway and u will start seeing contributions from Peter Shugalev.

reubenyap avatar Sep 20 '17 07:09 reubenyap

Hi @JadenGeller, after discussion we have decided not to implement this suggestion. Our code is generally kept up to date with Bitcoin Core who do in fact build with warnings. It would be a considerable challenge to implement as a result.

riordant avatar May 28 '19 09:05 riordant