[mapguide-internals] Re: Upgrade to VC10 and GDAL 1.9
Trevor Wekel
trevor_wekel at otxsystems.com
Fri Feb 3 11:45:13 EST 2012
Hi Jackie,
One of the biggest problems with mixing and matching compilers is that the C/C++ allocators are different for each compiler. If a VC9 compiled dll mallocs a piece of memory and a VC10 compiled dll frees the same piece of memory then bad things can happen like memory leaks, crashes, etc.
Most libraries include a "Free this" API for memory/objects so this typically doesn't happen. If the libraries and code written against them are a little naughty, then we can run into problems. With half a million lines of FDO and MapGuide source and (millions?) of lines of third party libraries, I think we would be hard pressed to guarantee that all code and all APIs are being "good".
I have also seen memory checker tools get really confused with multiple C/C++ allocators in play. I suspect they successfully hook one allocator and miss the other one. This will make bug fixing even more problematic in a multi-threaded environment.
As a side note, the inclusion of (old) VC 2005 libraries through the GDAL ECW plug in was causing crashes in MapGuide 2.2. That's why we had to go to a pure VS2008 for GDAL + extensions.
In summary, I would mixing if possible.
Trevor
-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Jackie Ng
Sent: February 3, 2012 9:34 AM
To: mapguide-internals at lists.osgeo.org
Subject: [mapguide-internals] Re: Upgrade to VC10 and GDAL 1.9
Got a question for the C++ experts (I humbly admit that I am not one :-) ).
dll compatibility problems concerning compiler version only come into play
if dlls are exporting C++ classes and functions right?
Since Apache modules and PHP extensions do everything through C interfaces,
the compiler used to build them shouldn't really matter. So in that case, we
should just be able to use the VC9 Apache/PHP web tier components with a
VC10 server right?
- Jackie
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Upgrade-to-VC10-and-GDAL-1-9-tp4337041p4362331.html
Sent from the MapGuide Internals mailing list archive at Nabble.com.
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
More information about the mapguide-internals
mailing list