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