[Community] GEOS, Shapely, DLLs, and memory
Christopher Barker
Chris.Barker at noaa.gov
Mon Apr 27 23:44:25 EEST 2009
I don't know enough to comment on this patch, but:
> According to a "Potential Errors
> Passing CRT Objects Across DLL Boundaries" [1]:
>
> "A related problem can occur when you allocate memory (either
> explicitly with new or malloc, or implicitly with strdup,
> strstreambuf::str, and so on) and then pass a pointer across a DLL
> boundary to be freed. This can cause a memory access violation or heap
> corruption if the DLL and its users use different copies of the CRT
> libraries.
>
> The basic problem is that two DLLs can use different copies of the
> CRT.
I'm pretty sure this is why python extensions need to be built with the
same compiler (really the same CRT) as python itself on Windows. Maybe
an alternative is to make sure your whole stack is built with the same
CRT -- a pain, I know.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the Community
mailing list