sgsokol/rmumps

warning: `'realloc' called on pointer '*grafptr.edgetax' with nonzero offset 4 [-Wfree-nonheap-object]`

Closed this issue · 4 comments

@sgsokol Could you say whether this is of concern or not?

This is on a 32-bit arch (ppc):

In file included from graph_io_habo.c:64:
graph_io_habo.c: In function '_SCOTCHgraphGeomLoadHabo':
common.h:144:37: warning: 'realloc' called on pointer '*grafptr.edgetax' with nonzero offset 4 [-Wfree-nonheap-object]
  144 | #define memRealloc(ptr,size)        realloc ((ptr),((size) | 8))
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
graph_io_habo.c:349:32: note: in expansion of macro 'memRealloc'
  349 |   grafptr->edgetax = ((Gnum *) memRealloc (grafptr->edgetax + 1, grafptr->edgenbr * sizeof (Gnum))) - 1;
      |                                ^~~~~~~~~~

This warning occurs in scotch software. If you don't use scotch reordering than it cannot be concern in any case. If you do, you'd better to do some testing to see if everything is working as expected.

@sgsokol Thank you for responding.

@catap Kirill, I think you are familiar with scotch pretty well, could you comment on this matter?

@barracuda156 well, it depends on alloc implementation and stric one should fail here.

I've re-opened this issue in Scotch upstream, because obtain an account isn't easy task :)

https://gitlab.inria.fr/scotch/scotch/-/issues/38

@catap Thank you!