msvc: scripted-diff: Remove NDEBUG pre-define in project file #15431

pull ken2812221 wants to merge 2 commits into bitcoin:master from ken2812221:msvc-no-ndebug changing 18 files +34 −35
  1. ken2812221 commented at 10:37 AM on February 17, 2019: contributor

    Follow #15391

  2. scripted-diff: Remove NDEBUG pre-define
    -BEGIN VERIFY SCRIPT-
    sed -i 's/NDEBUG;//g' $(git grep --name-only 'NDEBUG;' build_msvc)
    -END VERIFY SCRIPT-
    8a1f0a38d4
  3. appveyor: Remove unused NDEBUG removal 3ec56bea0d
  4. fanquake added the label Windows on Feb 17, 2019
  5. fanquake added the label Build system on Feb 17, 2019
  6. fanquake commented at 12:27 PM on February 17, 2019: member
  7. sipsorcery commented at 3:35 PM on February 17, 2019: member

    @ken2812221 isn't NDEBUG desirable for msvc release builds? Without it assert statements will terminate the programs.

    Update: After looking over #15391 I now see the origin of the removal. I guess it's a design decision for the bitcoin-core programs but on Windows it's a real pain when bitcoin-qt crashes as the result of an assertion. It's very rare to see that type of behaviour on Windows apps. The preferred approach is to throw an exception and at least display a usable error message to users before terminating.

  8. ken2812221 commented at 3:42 PM on February 17, 2019: contributor

    You can't build it after #15391 merged. The CI pass because I disabled them by the appveyor.yml

  9. sipa commented at 3:49 PM on February 17, 2019: member

    @sipsorcery If an assertion is false, aborting is often far better than the alternative (with assumptions violated, we may accept an invalid chain for example...).

  10. MarcoFalke deleted a comment on Feb 17, 2019
  11. MarcoFalke commented at 4:29 PM on February 17, 2019: member

    How could this compile locally, but then suddenly stop to compile with #15391, given that we have the same compile time check in validation.cpp?

  12. ken2812221 commented at 4:40 PM on February 17, 2019: contributor

    Maybe @sipsorcery just delete them in libbitcoin_server.vcxproj in his first PR?

  13. sipsorcery commented at 5:39 PM on February 17, 2019: member

    tACK 8a1f0a38d4a7cef544001e86c569bde747db2ecb 3ec56bea0d7b36bef2b6c7095ecd7d9fb43a3631. @MarcoFalke if your comment was for me then I didn't have any problems compiling with msvc before or after this PR. Instead I was just having a little moan about the unfriendly way asserts terminate bitcoin-qt. But that decision was made by a wiser person(s) than me so I'll track down the root cause instead.

  14. MarcoFalke merged this on Feb 17, 2019
  15. MarcoFalke closed this on Feb 17, 2019

  16. MarcoFalke referenced this in commit b72c787dc8 on Feb 17, 2019
  17. DrahtBot locked this on Dec 16, 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-04-15 15:14 UTC

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