Skip to content

Instantly share code, notes, and snippets.

@rundel
Created March 21, 2018 17:31
Show Gist options
  • Save rundel/c7d31b0dc8bd63193058af3a82719cbb to your computer and use it in GitHub Desktop.
Save rundel/c7d31b0dc8bd63193058af3a82719cbb to your computer and use it in GitHub Desktop.
valgrind output using proj 5.0.0 with gdal 1.11.5
$ valgrind ogr2ogr -t_srs EPSG:4326 proj2.shp proj.shp
==79476== Memcheck, a memory error detector
==79476== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==79476== Using Valgrind-3.14.0.GIT and LibVEX; rerun with -h for copyright info
==79476== Command: ogr2ogr -t_srs EPSG:4326 proj2.shp proj.shp
==79476==
--79476-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option
--79476-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 2 times)
--79476-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 4 times)
--79476-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 8 times)
==79476== Invalid read of size 4
==79476== at 0x10099F69B: pj_ctx_get_errno (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x100554AD0: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x100554BB4: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x10000C365: FreeTargetLayerInfo(TargetLayerInfo*) (in /usr/local/bin/ogr2ogr)
==79476== by 0x100009658: main (in /usr/local/bin/ogr2ogr)
==79476== Address 0x10b408af0 is 0 bytes inside a block of size 32 free'd
==79476== at 0x1000C0C7D: free (vg_replace_malloc.c:533)
==79476== by 0x10099DF37: pj_dealloc (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x100554AC2: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x100554BB4: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x10000C365: FreeTargetLayerInfo(TargetLayerInfo*) (in /usr/local/bin/ogr2ogr)
==79476== by 0x100009658: main (in /usr/local/bin/ogr2ogr)
==79476== Block was alloc'd at
==79476== at 0x1000C0691: malloc (vg_replace_malloc.c:302)
==79476== by 0x10099F62E: pj_ctx_alloc (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x100554A4B: OGRProj4CT::OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x100554897: OGRCreateCoordinateTransformation(OGRSpatialReference*, OGRSpatialReference*) (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x10000B8B8: TranslateLayer(TargetLayerInfo*, OGRDataSource*, OGRLayer*, OGRDataSource*, int, int, char const*, OGRSpatialReference*, int, OGRSpatialReference*, OGRCoordinateTransformation*, int, int, int, GeomOperation, double, long, OGRGeometry*, OGRGeometry*, int, unsigned long long, long long*, int (*)(double, char const*, void*), void*) (in /usr/local/bin/ogr2ogr)
==79476== by 0x1000095F2: main (in /usr/local/bin/ogr2ogr)
==79476==
==79476== Invalid write of size 4
==79476== at 0x10099F6A6: pj_ctx_set_errno (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x10099DFB5: pj_dealloc_params (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x10099E07C: pj_default_destructor (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x100554AD0: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x100554BB4: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x10000C365: FreeTargetLayerInfo(TargetLayerInfo*) (in /usr/local/bin/ogr2ogr)
==79476== by 0x100009658: main (in /usr/local/bin/ogr2ogr)
==79476== Address 0x10b408af0 is 0 bytes inside a block of size 32 free'd
==79476== at 0x1000C0C7D: free (vg_replace_malloc.c:533)
==79476== by 0x10099DF37: pj_dealloc (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x100554AC2: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x100554BB4: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x10000C365: FreeTargetLayerInfo(TargetLayerInfo*) (in /usr/local/bin/ogr2ogr)
==79476== by 0x100009658: main (in /usr/local/bin/ogr2ogr)
==79476== Block was alloc'd at
==79476== at 0x1000C0691: malloc (vg_replace_malloc.c:302)
==79476== by 0x10099F62E: pj_ctx_alloc (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x100554A4B: OGRProj4CT::OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x100554897: OGRCreateCoordinateTransformation(OGRSpatialReference*, OGRSpatialReference*) (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x10000B8B8: TranslateLayer(TargetLayerInfo*, OGRDataSource*, OGRLayer*, OGRDataSource*, int, int, char const*, OGRSpatialReference*, int, OGRSpatialReference*, OGRCoordinateTransformation*, int, int, int, GeomOperation, double, long, OGRGeometry*, OGRGeometry*, int, unsigned long long, long long*, int (*)(double, char const*, void*), void*) (in /usr/local/bin/ogr2ogr)
==79476== by 0x1000095F2: main (in /usr/local/bin/ogr2ogr)
==79476==
==79476== Invalid read of size 4
==79476== at 0x10099F69B: pj_ctx_get_errno (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x100554ADE: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x100554BB4: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x10000C365: FreeTargetLayerInfo(TargetLayerInfo*) (in /usr/local/bin/ogr2ogr)
==79476== by 0x100009658: main (in /usr/local/bin/ogr2ogr)
==79476== Address 0x10b408af0 is 0 bytes inside a block of size 32 free'd
==79476== at 0x1000C0C7D: free (vg_replace_malloc.c:533)
==79476== by 0x10099DF37: pj_dealloc (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x100554AC2: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x100554BB4: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x10000C365: FreeTargetLayerInfo(TargetLayerInfo*) (in /usr/local/bin/ogr2ogr)
==79476== by 0x100009658: main (in /usr/local/bin/ogr2ogr)
==79476== Block was alloc'd at
==79476== at 0x1000C0691: malloc (vg_replace_malloc.c:302)
==79476== by 0x10099F62E: pj_ctx_alloc (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x100554A4B: OGRProj4CT::OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x100554897: OGRCreateCoordinateTransformation(OGRSpatialReference*, OGRSpatialReference*) (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x10000B8B8: TranslateLayer(TargetLayerInfo*, OGRDataSource*, OGRLayer*, OGRDataSource*, int, int, char const*, OGRSpatialReference*, int, OGRSpatialReference*, OGRCoordinateTransformation*, int, int, int, GeomOperation, double, long, OGRGeometry*, OGRGeometry*, int, unsigned long long, long long*, int (*)(double, char const*, void*), void*) (in /usr/local/bin/ogr2ogr)
==79476== by 0x1000095F2: main (in /usr/local/bin/ogr2ogr)
==79476==
==79476== Invalid write of size 4
==79476== at 0x10099F6A6: pj_ctx_set_errno (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x10099DFB5: pj_dealloc_params (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x10099E07C: pj_default_destructor (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x100554ADE: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x100554BB4: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x10000C365: FreeTargetLayerInfo(TargetLayerInfo*) (in /usr/local/bin/ogr2ogr)
==79476== by 0x100009658: main (in /usr/local/bin/ogr2ogr)
==79476== Address 0x10b408af0 is 0 bytes inside a block of size 32 free'd
==79476== at 0x1000C0C7D: free (vg_replace_malloc.c:533)
==79476== by 0x10099DF37: pj_dealloc (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x100554AC2: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x100554BB4: OGRProj4CT::~OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x10000C365: FreeTargetLayerInfo(TargetLayerInfo*) (in /usr/local/bin/ogr2ogr)
==79476== by 0x100009658: main (in /usr/local/bin/ogr2ogr)
==79476== Block was alloc'd at
==79476== at 0x1000C0691: malloc (vg_replace_malloc.c:302)
==79476== by 0x10099F62E: pj_ctx_alloc (in /usr/local/Cellar/proj/5.0.0_1/lib/libproj.13.dylib)
==79476== by 0x100554A4B: OGRProj4CT::OGRProj4CT() (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x100554897: OGRCreateCoordinateTransformation(OGRSpatialReference*, OGRSpatialReference*) (in /usr/local/Cellar/gdal/1.11.5_4/lib/libgdal.1.dylib)
==79476== by 0x10000B8B8: TranslateLayer(TargetLayerInfo*, OGRDataSource*, OGRLayer*, OGRDataSource*, int, int, char const*, OGRSpatialReference*, int, OGRSpatialReference*, OGRCoordinateTransformation*, int, int, int, GeomOperation, double, long, OGRGeometry*, OGRGeometry*, int, unsigned long long, long long*, int (*)(double, char const*, void*), void*) (in /usr/local/bin/ogr2ogr)
==79476== by 0x1000095F2: main (in /usr/local/bin/ogr2ogr)
==79476==
==79476==
==79476== HEAP SUMMARY:
==79476== in use at exit: 674,193 bytes in 746 blocks
==79476== total heap usage: 32,946 allocs, 32,200 frees, 4,333,291 bytes allocated
==79476==
==79476== LEAK SUMMARY:
==79476== definitely lost: 14,062 bytes in 104 blocks
==79476== indirectly lost: 537,888 bytes in 57 blocks
==79476== possibly lost: 3,920 bytes in 106 blocks
==79476== still reachable: 36,213 bytes in 272 blocks
==79476== suppressed: 82,110 bytes in 207 blocks
==79476== Rerun with --leak-check=full to see details of leaked memory
==79476==
==79476== For counts of detected and suppressed errors, rerun with: -v
==79476== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 25 from 4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment