[gdal-dev] OCI driver and Heap Corruption under Visual C++

Tamas Szekeres szekerest at gmail.com
Sat Aug 30 16:32:38 EDT 2008


I could only mention http://trac.osgeo.org/gdal/ticket/2230 in this
topic but I'm not sure if it is related to this problem.
I have been using OCI compiled with MSVC2005 a couple of months ago,
but didn't find such issue. However I'm using /MD instead of /MDd most
of the time.

Best regards,


2008/8/30 Mateusz Loskot <mateusz at loskot.net>:
> Folks,
> I'm experiencing heap corruption while calling OCIEnvCreate [1] function
> from OCI library. I build OCI driver in debug mode (with flags /D_DEBUG
> /MDd) using Visual C++ 8.0 linking against Oracle 10g Client.
> The bug seems to be random, because first test I made was with minimal set
> of OGR drivers built-in. In this case OGR drivers registration failed with
> heap corruption error, precisely while deallocating string in this line [2].
> Next, I built GDAL with default set of drivers + OCI driver
> and in that case OCIEnvCreate causes heap corruption.
> I spent a couple of hours debugging this issue, playing with MSVC Crt
> debugging utils, using memory checkpoints, etc. but without any reasonable
> findings, so far.
> I'm interested in finding what causes this problem, so I'd be thankful if
> anyone who has experienced similar problem could report what/how/when/etc.
> here on the list, including version of Visual C++ compiler and compilation
> flags used.
> [1]
> http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/oci/ogrocisession.cpp#L113
> [2]
> http://trac.osgeo.org/gdal/browser/trunk/gdal/port/cpl_vsil_win32.cpp#L496
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
> Charter Member of OSGeo, http://osgeo.org
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

More information about the gdal-dev mailing list