Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Feb 17, 2019
Merged

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

merged 2 commits into from
Feb 17, 2019

Conversation

ken2812221
Copy link
Contributor

Follow #15391

-BEGIN VERIFY SCRIPT-
sed -i 's/NDEBUG;//g' $(git grep --name-only 'NDEBUG;' build_msvc)
-END VERIFY SCRIPT-
@fanquake
Copy link
Member

cc @sipsorcery

@sipsorcery
Copy link
Member

sipsorcery commented Feb 17, 2019

@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.

@ken2812221
Copy link
Contributor Author

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

@sipa
Copy link
Member

sipa commented Feb 17, 2019

@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...).

@bitcoin bitcoin deleted a comment from trebliw5 Feb 17, 2019
@maflcko
Copy link
Member

maflcko commented Feb 17, 2019

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?

@ken2812221
Copy link
Contributor Author

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

@sipsorcery
Copy link
Member

tACK 8a1f0a3 3ec56be.

@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.

@maflcko maflcko merged commit 3ec56be into bitcoin:master Feb 17, 2019
maflcko pushed a commit that referenced this pull request Feb 17, 2019
…t file

3ec56be appveyor: Remove unused NDEBUG removal (Chun Kuan Lee)
8a1f0a3 scripted-diff: Remove NDEBUG pre-define (Chun Kuan Lee)

Pull request description:

  Follow #15391

Tree-SHA512: f264418cbc69b5f083469ed9005a6d592d4268f2b7da967e571ce30195de73b09a9e14c8610a5b6b0f056847d82a4bc7c2fbe56498307093aab4dd42903e6137
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants