[GRASS-user] r.in.xyz: *** glibc detected *** double free or corruption

Patton, Eric epatton at nrcan.gc.ca
Sat Oct 21 01:49:31 EDT 2006


Eric:
>> I may need some pointers on using gdb, as this is my first time. But
>> hopefully this backtrace will be useful.

Glynn:
>Not really. This is heap corruption; the backtrace corresponds to the
>point where the corruption was detected, which is usually long after
>the corruption actually occurred.


Ok. Can gdb be tweaked to produce more meaninful/relevant output in regards
to this error?


Glynn:
>The usual mechanisms for dealing with heap corruption are:
>
>1. Manually examine the code for errors (alloc/free mismatches,
>potential out-of-bounds array writes).
>
>2. Use heap checking tools (libmcheck, Electric Fence, valgrind).
>
>Using option #1, the following is noticable (line 467+):
>
>		else { /* oh well, we tried. */
>		    G_free_tokens(tokens);
>		    continue;
>		}
>
>The tokens array has already been freed at line 447, so this call is
>bogus; remove the G_free_tokens() call, resulting in:
>
>		else { /* oh well, we tried. */
>		    continue;
>	}
>

I'll try this out when I get back to the office on Monday. Thanks.

~ Eric.




More information about the grass-user mailing list