[GRASS-dev] g.region -g crashes in a latlon location
glynn at gclements.plus.com
Mon Jul 21 19:30:12 EDT 2008
Maciej Sieczka wrote:
> > Below that, there isn't actually anything which can cause a segfault.
> > So, it's very much looking like a broken system.
> Gotcha! I'm using GCC 4.3.1 on amd64 Debian testing. Apparently it
> doesn't like GRASS default optimisation flags "-g -O2". When I override
> them it with e.g. "-pipe" alone, the segfault is gone.
> On another machine (Ubuntu Gutsy amd64) where GCC is 4.1.3, "-g -O2" has
> no side effects.
Ah; a compiler bug. Probably.
Disabling optimisation will often hide actual bugs, but in this case,
that doesn't appear to be possible. The code in question,
lib/gis/geodist.c, doesn't use any pointers; it's just arithmentic and
> Should GRASS enforce any optimisation flags by default?
Nope; it should use whichever flags it's told to. The '-g -O2' is
autoconf's default, if CFLAGS isn't set in the environment.
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev