[gdal-dev] Notes on gdalbuildvrt.cpp
Nicu Tofan
nicu.tofan at gmail.com
Thu Aug 21 12:13:15 PDT 2014
Hello Even,
- VRTBuilder::pasDatasetProperties line 237
DatasetProperty* psDatasetProperties
This is a variable allocated on the stack; on function entry it contains a
pointer somewhere inside pasDatasetProperties; Say pasDatasetProperties is
0x7500000 and psDatasetProperties is
0x7500100. Now on line pasDatasetProperties the buffer at 0x7500000gets
reallocated, possibly moving to, say, 0x90000000; psDatasetPropertiesshould
now be 0x90000100 but it is still 0x7500100 because it is stored in a
variable on the stack - namelly the argument psDatasetPropertie.
On line 457 psDatasetPropertie is used and is going to contain 0x750010. It
may not trigger an access violation because the address will probably be
inside the heap but it may generate some hard to find bugs that we all love
and cherish.
As a reflection of mine, this may be the result of the naming convention,
as psDataset and pasDataset look the same to our animal brains.
- Generally this is a sign of non georeferenced images...
The bounding box becomes a bit more complicated in rotated images, too. I'm
gonna look into it.
- GDALProxyPoolDatasetH
Got it, thanks!
Regards,
Nick
PS Forgot to reply to the list, sorry.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140821/009d1299/attachment.html>
More information about the gdal-dev
mailing list