From e79b387e03ff80927f0b15b5f43366e06d3a48a8 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 17 Apr 2013 13:13:29 +0300 Subject: It is very wrong to #undef _DEBUG in some source files of a library Nowadays in a dbgutil build with MSVC, the debugging runtime (C++ library) is used. Just like with the GNU libstdc++, it is not binary compatible with the non-debugging variant. All sources that go into one DLL or EXE must be compiled with the same _DEBUG settings (unless one is extremely careful and knows exactly what one is doing, which presumably is not the case with this code). With previous compilers this has gone undetected, but with MSVC2012 at least, you get link-time errors, which is a good thing: nssinitializer.o : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in biginteger.o nssinitializer.o : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in biginteger.o Whether this actually has caused run-time erroneous behaviour or not in a dbgutil build is another thing... Change-Id: I0c42161f00a0e37b438e3b911e3c0058edadd800 --- xmlsecurity/source/xmlsec/nss/nssinitializer.cxx | 7 ------- xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx | 8 -------- 2 files changed, 15 deletions(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index 3ec0106ab6c6..b91e1db8569d 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -18,13 +18,6 @@ */ -/* - * Turn off DEBUG Assertions - */ -#ifdef _DEBUG -#undef _DEBUG -#endif - /* * and turn off the additional virtual methods which are part of some interfaces when compiled * with debug diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx index 740b02f12e3b..aaa21295a663 100644 --- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx @@ -17,14 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * Turn off DEBUG Assertions - */ -#ifdef _DEBUG -#undef _DEBUG -#endif - /* * and turn off the additional virtual methods which are part of some interfaces when compiled * with debug -- cgit