[GRASS-dev] Re: [GRASS GIS] #50: g.copy segfaults (debian.gfoss.it package) [and latest SVN]

Dylan Beaudette dylan.beaudette at gmail.com
Fri Apr 11 18:25:27 EDT 2008


On Friday 11 April 2008, Glynn Clements wrote:
> GRASS GIS wrote:
> > #50: g.copy segfaults (debian.gfoss.it package) [and latest SVN]
> > ----------------------+--------------------------------------------------
> >--- Reporter:  steko    |       Owner:  grass-dev at lists.osgeo.org
> >       Type:  defect   |      Status:  new
> >   Priority:  major    |   Milestone:  6.4.0
> >  Component:  default  |     Version:  6.3.0 RCs
> > Resolution:           |    Keywords:  g.copy
> > ----------------------+--------------------------------------------------
> >--- Changes (by dylan):
> >
> >   * summary:  g.copy segfaults (debian.gfoss.it package) => g.copy
> >               segfaults (debian.gfoss.it package) [and latest
> >               SVN]
> >
> > Comment:
> >
> >  Ouch. This bug has been biting me for a while now. How can optimization
> >  cause a segfault for {{{g.copy rast=rast1,rast2}}} but not for {{{g.copy
> >  vect=vect1,vect2}}} ?
>
> For vectors, the copying is performed by calling Vect_copy(). For all
> other types, g.copy copies the files itself.

OK.

>
> > This sounds like a nasty bug to me.
>
> Unfortunately, it isn't likely to get fixed unless someone who can get
> the segfault to occur can debug it, at least to the extent of
> identifying exactly where the segfault occurs.

Dang! I have seen the bug for a number of months now, across operating systems 
and architectures. For starters, here are the GCC optimization flags:

http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

> As it only occurs with optimisation enabled, it will probably need to
> be debugged in assembler ("set language asm"), as GDB cannot reliably
> relate execution to the source code for optimised code (the structure
> of optimised code often bears little resemblence to the source code).

Yikes. Can't really do that.


I will post some details to the original ticket.

Dylan

-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341


More information about the grass-dev mailing list