warning: `'realloc' called on pointer '*grafptr.edgetax' with nonzero offset 4 [-Wfree-nonheap-object]`
Closed this issue · 4 comments
barracuda156 commented
@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;
| ^~~~~~~~~~
sgsokol commented
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.
barracuda156 commented
catap commented
@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 :)
barracuda156 commented
@catap Thank you!