[geos-devel] Segmentation Fault in ARM platform

Adriano C Naspolini adriano at arvus.com.br
Sat Feb 28 15:45:07 EST 2009

Hi people,
I recently installed gdal-1.6.0+geos-3.0.3 in my pc as in my target 
prataform (an ARM). Initially, i had an endianess problem with gdal (the 
target arm is little endian in bytes but big endian in words, so 0x1234 
becomes 0x3412 and 0x12345678 becomes 0x56781234). After patching 
shapelib it's working.
The problem now is with geos: a segmentation fault when I use Contains() 
function (also with Crosses(), there are certainly others). I think this 
could be the same endianness problem, or something like it, because the 
program runs normally on my pc.

Backtrace from GDB:
#0  0x2c327dfc in memcpy () from /lib/libc.so.6
#1  0x2c204d7c in std::basic_streambuf<char, std::char_traits<char> 
 >::xsgetn () from /usr/lib/libstdc++.so.5
#2  0x2c43e580 in std::istream::read () from /usr/lib/libstdc++.so.6
#3  0x2abb58a4 in geos::io::WKBReader::readGeometry (this=0x7f5ff8a0) at 
#4  0x2aad8ed8 in GEOSGeomFromWKB_buf (wkb=0x247f28 "\001\003", size=93) 
at geos_c.cpp:598
#5  0x2b148d4c in OGRGeometry::exportToGEOS (this=0x263fa0) at 
#6  0x2b148614 in OGRGeometry::Contains (this=0x7f5ff8b0, 
poOtherGeom=0x0) at ogrgeometry.cpp:2560
#7  0x0001ee8c in Mapa::getAttr (this=0xac818, 
longitude=-47.590694333333332, latitude=-15.337605333333332) at 

Any Idea?

Thank you.


More information about the geos-devel mailing list