[GRASS5] [bug #1052] (grass) [rsv].proj are crashing

Glynn Clements glynn.clements at virgin.net
Wed May 22 10:42:56 EDT 2002


Request Tracker wrote:

> Subject: [rsv].proj are crashing
> 
> grass binary for platform: Compiled from Sources
> 
> A critical bug report:
> 
> v.proj  in=austria loca=europa mapset=europa
> Segmentation fault (core dumped)
> 
> Also r.proj (and eventually s.proj, untested) are affected.
> 
> I have spent some time in src/libes/gis/env.c where the crash occurs
> in line 195 of get_env() function. The reason is unclear to me why
> strcmp() crashes sometimes (maybe someone else understands the
> problem).

If strcmp() crashes, one of its arguments is invalid, in the sense
that either:

a) it points to an invalid address (e.g. NULL), or
b) it points to a valid address, but scanning the string reaches an
invalid address before it reads a terminating NUL byte.

So, something is passing bad values to strcmp(). In this instance,
either the "environment" is bad, or the caller is passing a bad "name"
argument to G_getenv() or similar.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list