Add VERIFY_CHECK and use CHECK macros more #54

pull sipa wants to merge 1 commits into bitcoin-core:master from sipa:morecheck changing 11 files +159 −65
  1. sipa commented at 9:35 PM on August 18, 2014: contributor

    Add a new macros DEBUG_CHECK (similar to assert) and VERIFY_CHECK (which only performs CHECK() when -DVERIFY is set), and move those macros to util.h.

    All internal asserts are converted to VERIFY_CHECKs, all external input validation are converted to DEBUG_CHECKs.

  2. sipa commented at 10:09 AM on August 19, 2014: contributor

    Updated to also have DEBUG_CHECK (which works very similar to assert), and use that for external input validation.

  3. sipa commented at 10:14 AM on August 19, 2014: contributor

    @gmaxwell care to review?

  4. sipa force-pushed on Aug 25, 2014
  5. gmaxwell commented at 10:56 PM on August 25, 2014: contributor

    ACK (your check macro might like a builtin_expect to hint that its unlikely, though I suspect GCC is smart enough to do that for the abort())

  6. Add VERIFY_CHECK/DEBUG_CHECK and use CHECK macros more 1c7fa133a6
  7. sipa force-pushed on Aug 25, 2014
  8. sipa commented at 11:27 PM on August 25, 2014: contributor

    @gmaxwell Added.

    I do indeed expect that GCC is already smart enough, but it won't hurt.

  9. sipa merged this on Aug 26, 2014
  10. sipa closed this on Aug 26, 2014

  11. sipa referenced this in commit 9a57dd278a on Aug 26, 2014
  12. sipa cross-referenced this on Aug 28, 2014 from issue The secp256k1.o object should be built with NDEBUG by sipa
  13. sipa cross-referenced this on Aug 28, 2014 from issue Assertion `a->limbs + b->limbs <= 2*((256+(64 - 0)-1)/(64 - 0))+1' failed. by dpc
  14. real-or-random referenced this in commit f4f374700b on May 31, 2019

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 11:15 UTC

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