Oracle-Spatial: Crash
Benedikt Rothe
umn-ms at HYDROTEC.DE
Thu Nov 16 08:36:50 PST 2006
Hi
I've created
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1961
Regards
Benedikt
Frank Warmerdam <warmerdam at pobox.com> schrieb am 15.11.2006 16:12:18:
> Benedikt Rothe wrote:
> >
> > Hello list-members, hello Fernando Simon
> >
> > We are using Mapserver with Java/Oracle and found crashes (of the hole
> > VM) in some
> > calls of layerObj.getFeature(int shapeindex, int tileindex);
> >
> > As fare as I can see, the crashes occure when the queried SDO_Geometry
> > has value null.
> >
> > Digging in maporaclespatial.c /msOracleSpatialLayerGetShape:
> > Line 2155 (in Version 4.10.0)
> > success = TRY( hand, OCIDefineByPos( dthand->stmthp,
> > &items[i], .....
> > (where i is index over selected columns)
> >
> > The array "items" is allocated and initialized with only one element.
> > Therefore &items[i] is a pointer to
> > arbitrary memory for i > 0. This seems to cause the crash.
> >
> > Changed the code in the obvious way:
> > - items declared as
> > OCIDefine **items;
> > - allocation:
> > items = calloc(sizeof(OCIDefine*),layer->numitems);
> >
> > The Crashes we detected disappeared. No harmfull side-effects found.
> >
> > Cleaning of the allocated memory is still needed. (As fare as I can
see
> > memory cleaning is also
> > missing for the variable nullind.)
> >
> > Same problem in msOracleSpatialLayerGetExtent.
> >
> > Greetings
> > Benedikt
>
> Benedikt,
>
> Good catch! If you don't hear from Fernando quite soon, you should
> submit this via bugzilla so it doesn't get lost. In fact, if this fix
> is to be back-ported into 4.10.1 it will need a bugzilla entry (a
> requirement for stable release changes).
>
> Best regards,
> --
>
---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | President OSGeo,
http://osgeo.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20061116/2881c873/attachment.htm>
More information about the MapServer-users
mailing list