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

GRASS GIS trac at osgeo.org
Fri Apr 11 18:55:05 EDT 2008


#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                   
----------------------+-----------------------------------------------------
Comment (by dylan):

 Some updates:

 Glyn says that this can only really be debugged by looking at assembly.
 Since I cannot do that, another approach might be toggling various
 optimization flags in order to get an idea of what may be causing the
 segfault. Below are some details on my system / optimization flags /
 results.

 GCC details:

 {{{
 gcc -v
 Using built-in specs.
 Target: i486-linux-gnu
 Configured with: ../src/configure -v --enable-
 languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-
 shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext
 --enable-threads=posix --enable-nls --with-gxx-include-
 dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit
 --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --with-
 tune=i686 --enable-checking=release i486-linux-gnu
 Thread model: posix
 gcc version 4.1.3 20070601 (prerelease) (Debian 4.1.2-12)
 }}}

 compile flags that cause a segfault:
 -O3 (probably segfault)
 -O2 (segfault)
 -O1 (or) -O (segfault)
 -O0 (works as expected)

 The actual CFLAGS for no optimization were: {{{export
 CFLAGS="-march=opteron -O0 -ggdb -Wall -Werror-implicit-function-
 declaration" ; export CXXFLAGS="-march=opteron -O0" ./configure ...}}} .


 So it is probably one of these flags that is causing the optimization-
 related segfault:
 {{{
 -fauto-inc-dec
           -fcprop-registers
           -fdce
           -fdefer-pop
           -fdelayed-branch
           -fdse
           -fguess-branch-probability
           -fif-conversion2
           -fif-conversion
           -finline-small-functions
           -fipa-pure-const
           -fipa-reference
           -fmerge-constants
           -fsplit-wide-types
           -ftree-ccp
           -ftree-ch
           -ftree-copyrename
           -ftree-dce
           -ftree-dominator-opts
           -ftree-dse
           -ftree-fre
           -ftree-sra
           -ftree-ter
           -funit-at-a-time
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/50#comment:4>
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/


More information about the grass-dev mailing list