Opened 16 years ago

Closed 16 years ago

#2603 closed defect (invalid)

autotest crashes on ./hdf4_write.py on a 64bit build

Reported by: Even Rouault Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: hdf4 64bit
Cc:

Description

Configuration : Ubuntu 8.04, 64bit, with libhdf4g-4.1r4-21 from official ubuntu repository. GDAL built with hdf4 (netcdf excluded to avoid the famous problem)

valgrind on ./hdf4_write.py

  TEST: CreateCopy: int32.tif rank=3 ... success
  TEST: Create: int32.tif rank=3 ... ==15594== 
==15594== Invalid read of size 1
==15594==    at 0x4C250A8: memcpy (mc_replace_strmem.c:402)
==15594==    by 0x850D73F: DFKnb4b (in /usr/lib/libdf.so.4.1r4)
==15594==    by 0x82AD0FB: (within /usr/lib/libmfhdf.so.4.1r4)
==15594==    by 0x82AE3BE: NCvario (in /usr/lib/libmfhdf.so.4.1r4)
==15594==    by 0x82B621D: SDwritedata (in /usr/lib/libmfhdf.so.4.1r4)
==15594==    by 0x628E9BD: HDF4ImageRasterBand::IWriteBlock(int, int, void*) (hdf4imagedataset.cpp:511)
==15594==    by 0x63DB8AE: GDALRasterBlock::Write() (gdalrasterblock.cpp:304)
==15594==    by 0x63D778D: GDALRasterBand::FlushBlock(int, int) (gdalrasterband.cpp:942)
==15594==    by 0x63D783C: GDALRasterBand::FlushCache() (gdalrasterband.cpp:781)
==15594==    by 0x63B8FAE: GDALDataset::FlushCache() (gdaldataset.cpp:271)
==15594==    by 0x628DC61: HDF4ImageDataset::FlushCache() (hdf4imagedataset.cpp:844)
==15594==    by 0x628E055: HDF4ImageDataset::~HDF4ImageDataset() (hdf4imagedataset.cpp:689)
==15594==  Address 0x100b7283 is 3 bytes after a block of size 1,600 alloc'd
==15594==    at 0x4C22FAB: malloc (vg_replace_malloc.c:207)
==15594==    by 0x6404744: VSIMalloc (cpl_vsisimple.cpp:300)
==15594==    by 0x63DC3D9: GDALRasterBlock::Internalize() (gdalrasterblock.cpp:363)
==15594==    by 0x63D7C60: GDALRasterBand::GetLockedBlockRef(int, int, int) (gdalrasterband.cpp:1102)
==15594==    by 0x63E38BD: GDALRasterBand::IRasterIO(GDALRWFlag, int, int, int, int, void*, int, int, GDALDataType, int, int) (rasterio.cpp:89)
==15594==    by 0x63D730C: GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int, int, GDALDataType, int, int) (gdalrasterband.cpp:241)
==15594==    by 0x63D73D2: GDALRasterIO (gdalrasterband.cpp:266)
==15594==    by 0x5E43A28: _wrap_Band_WriteRaster (gdal_wrap.cpp:3431)
==15594==    by 0x417E32: PyObject_Call (in /usr/bin/python2.5)
==15594==    by 0x487072: PyEval_EvalFrameEx (in /usr/bin/python2.5)
==15594==    by 0x48A405: PyEval_EvalCodeEx (in /usr/bin/python2.5)
==15594==    by 0x488074: PyEval_EvalFrameEx (in /usr/bin/python2.5)

... many more warnings, and finaly a segmentation fault

Change History (2)

comment:1 by Even Rouault, 16 years ago

Works great on Ubuntu 7.10, 32bit

comment:2 by Even Rouault, 16 years ago

Resolution: invalid
Status: newclosed

By compiling against HDF4.2r3, no more crash with GDAL 64bit build. So the Ubuntu package is a bit too old...

Note: See TracTickets for help on using tickets.