[PROJ] Odd 6.3.0RC1 issue
Even Rouault
even.rouault at spatialys.com
Mon Dec 30 09:49:42 PST 2019
> Here I'm just reporting a very puzzling issue. Checking across some other
> EPSG, it seems to affect EPSG:27700
Looking a bit at
https://r-forge.r-project.org/scm/viewvc.php/pkg/src/ogr_proj.cpp?annotate=906&root=rgdal
I see several issues, but I don't think they explain the issue you get:
- memory leak: papszOptions set at lines 381 and 382 is not freed with CSLDestroy()
- use after free: ToWGS84 and Datum are used at lines 427 and 42. But they are owned by hSRS,
which is itself owned by poLayer which is itself owned by poDS, which is freed at line 423.
Furthermore, even if that issue is fixed, values returned by GetAttrValue() should be
considered as short-lived, and valid only until the next call to the OSR API
(some methods might modify the internal WKT representation and invalidate them)
- the call to morphFromESRI() at line 412 is no longer needed with GDAL 3.
I'd suggest you run this code under Valgrind.
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the PROJ
mailing list