[GRASS-dev] Re: [GRASS GIS] #536: memory corruption

GRASS GIS trac at osgeo.org
Sun Mar 29 12:30:30 EDT 2009

#536: memory corruption
  Reporter:  martinl  |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect   |      Status:  reopened                 
  Priority:  blocker  |   Milestone:  7.0.0                    
 Component:  Vector   |     Version:  svn-trunk                
Resolution:           |    Keywords:                           
  Platform:  Linux    |         Cpu:  x86-32                   
Comment (by mmetz):

 Replying to [comment:18 martinl]:
 > When implementing very basic GEOS support in v.select I was facing to
 the similar problem.
 > In the loop
 is initialized ifield variable. Inside of the loop everything is OK -
 ifield[0] and ifield[1] are initialized properly. After leaving the loop
 in ifield[0] occurs random value.
 > More strangely when I add before line
 > {{{
 > struct GOption *in_opt[2];
 > }}}
 > memory is not corrupted at all.

 Doesn't make any sense to me why ifield[0] should get a random value.
 Maybe just use the working solution?

 FYI, I have already taken some algorithms from GEOS, translated from C++
 to C, optimized where possible and put into the grass7 vector libs,
 replacing less efficient algorithms (topology building for areas). If you
 want some GEOS functionality to be available in the grass vector libs
 directly, we could join forces.

 Best, Markus

Ticket URL: <http://trac.osgeo.org/grass/ticket/536#comment:19>
GRASS GIS <http://grass.osgeo.org>

More information about the grass-dev mailing list