[GRASS-dev] Errors with r.li.* modules

Markus Neteler neteler at osgeo.org
Fri Oct 5 03:36:49 PDT 2018


On Fri, Oct 5, 2018 at 3:40 AM Veronica Andreo <veroandreo at gmail.com> wrote:
>
> Hi devs,
>
> I'm trying to use r.li.* modules to develop an example for a course. I am currently working in trunk, though I had to create the config files in 74 rel branch because I get an error in trunk (reported already in [0]).
>
> Now, when I try to use r.li.shannon for example (though it happens with other modules as well), I get the following error:
>
> r.li.shannon --overwrite input=landclass96 at PERMANENT config=forest_mov_win output=forest_mov_win_sh
> munmap_chunk(): invalid pointer <<<--- THIS

Here the result of a valgrind test:

GRASS 7.7.svn (nc_spm_08_grass7):~ >

g.region raster=landclass96

CMD="r.li.shannon --overwrite input=landclass96 at PERMANENT
config=forest_mov_win output=forest_mov_win_sh"

valgrind --tool=massif $CMD --o
==3373== Massif, a heap profiler
==3373== Copyright (C) 2003-2017, and GNU GPL'd, by Nicholas Nethercote
==3373== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==3373== Command: r.li.shannon --overwrite input=landclass96 at PERMANENT
config=forest_mov_win output=forest_mov_win_sh --o
==3373==

valgrind: m_mallocfree.c:307 (get_bszB_as_is): Assertion 'bszB_lo ==
bszB_hi' failed.
valgrind: Heap block lo/hi size mismatch: lo = 3840, hi = 9513.
This is probably caused by your program erroneously writing past the
end of a heap block and corrupting heap metadata.  If you fix any
invalid writes reported by Memcheck, this assertion failure will
probably go away.  Please try that before reporting this as a bug.

host stacktrace:
==3373==    at 0x58007B42: ??? (in /usr/lib64/valgrind/massif-amd64-linux)
==3373==    by 0x58007C54: ??? (in /usr/lib64/valgrind/massif-amd64-linux)
==3373==    by 0x58007DE4: ??? (in /usr/lib64/valgrind/massif-amd64-linux)
==3373==    by 0x58014A89: ??? (in /usr/lib64/valgrind/massif-amd64-linux)
==3373==    by 0x5805F05B: ??? (in /usr/lib64/valgrind/massif-amd64-linux)
==3373==    by 0x5806E2AA: ??? (in /usr/lib64/valgrind/massif-amd64-linux)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable (lwpid 3373)
==3373==    at 0x4C2E15C: free (vg_replace_malloc.c:530)
==3373==    by 0x5047333: close_new (in
/home/mneteler/software/grass77/dist.x86_64-pc-linux-gnu/lib/libgrass_raster.7.7.svn.so)
==3373==    by 0x4E366BE: calculateIndex (in
/home/mneteler/software/grass77/dist.x86_64-pc-linux-gnu/lib/libgrass_rli.7.7.svn.so)
==3373==    by 0x586C11A: (below main) (in /usr/lib64/libc-2.27.so)

Worth a ticket I believe.

Best
Markus


More information about the grass-dev mailing list