Warnings about undefined behavior and too large allocations
I get the following warnings when compiling dune-ug:
dune-uggrid/dune/uggrid/gm/ugio.cc:3366:39: warning: argument 1 value »18446744073709551614« exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
3366 | ProcList = (unsigned short*)malloc(PROCLISTSIZE*sizeof(unsigned short));
and
dune-uggrid/dune/uggrid/gm/er.cc:1666:50: warning: iteration 4 invokes undefined behavior [-Waggressive-loop-optimizations]
1666 | sonData->corners[k] = ur->sons[j].corners[k];
dune-uggrid/dune/uggrid/gm/er.cc:1668:40: warning: iteration 4 invokes undefined behavior [-Waggressive-loop-optimizations]
1668 | sonData->nb[k] = ur->sons[j].nb[k];
To look at these undefined behaviours and exceeding of maximal allocation size could be important, I think.