mailing list archives
RE: CRT-libs on MSVC
From: "Rob Nicholls" <robert () robnicholls co uk>
Date: Sat, 26 Jan 2013 17:28:34 -0000
From: dev [mailto:dev-bounces () nmap org] On Behalf Of David Fifield
Sent: 26 January 2013 17:06
To: Gisle Vanem
Subject: Re: CRT-libs on MSVC
Ok. I assumed both release/debug used the same base "model". A bit
strange to use '/MD' and '/MTd' for release/debug. But as you say ..
This is because I only changed Release back then, we probably should change
Debug to match for consistency.
In Release mode we do use /MD, I think specifically because of OpenSSL.
I think the reason for this is long forgotten and not an issue
Sorry for the slow reply! IIRC the reason we changed from /MT to /MD is
because Microsoft recommend the use of /MD so the application uses the
side-by-side runtimes on the machine (instead of sticking a multithreaded
static version of the runtime inside it, with /MT). That way any security
issues can be fixed by Microsoft and rolled out through Windows Update so
users can immediately protect themselves from any potential security issues
that might otherwise lie in Nmap.
I believe /MD is also the default setting for Visual C++ 2005 onwards. Using
/MT can introduce issues (e.g. access violation) if different projects use
separate copies of the CRT; but using /MD they can share a single copy of
the CRT, allowing them to pass CRT objects across DLL boundaries.
Sent through the dev mailing list
Archived at http://seclists.org/nmap-dev/