Ticket #3309 (reopened defect)
Change in libgeotiff broke MrSID support
|Reported by:||rouault||Owned by:||warmerdam|
|Severity:||major||Keywords:||libgeotiff mrsid gtiff|
I have fought the whole day long trying to understand why I got constant crashes when reading .sid files (environmenet : Fedora 12 32 bit, GCC 4.4.2, Geo_DSDK-220.127.116.117, internal libtiff & libgeotiff), for example on autotest/gdrivers/data/mercator.sid
It finally turns out that the addition of the DefnSet? field in GTIFDefn structure (geo_normalize.h) was the cause ( http://trac.osgeo.org/geotiff/changeset/1641 and refreshed from upstream libgeotiff in r18007). This is a change in the ABI. From the symbols needed by libltidsdk.a, I see that GTIFGetDefn() is used. So, as a variable of type struct GTIFDefn can only be allocated by the caller, the addition of the DefnSet? field likely causes some internal state of the mrsid binary to be overwritten which yields to the crash.
So what are the options ? Reverting the addition of DefnSet? field ? In any event, for the future, it might be sane to add an allocator/deallocator for the GTifDefn structure and urge people to use it if we might add new fields.