#2741: Some thorns seem to incorrectly use CCTK_GFINDEX4D
Reporter:Gabriele Bozzola
Status:new
Milestone:
Version:
Type:bug
Priority:major
Component:EinsteinToolkit thorn

A student in my group found the following problem in ID_converter_ILGRMHD:

If you compile Einstein Toolkit in debug mode, the code crashes. This is due to the function CCTK_GFINDEX4D that is used in some thorns (such as ID_converter_ILGRMHD). The function is used to unroll a vector index into a linear one:

int CCTK_GFIndex4D (const cGH *GH, int i, int j, int k, int l)
{
#ifdef CCTK_DEBUG
  if (i < 0 || i >= GH->cctk_lsh[0] ||
      j < 0 || j >= GH->cctk_lsh[1] ||
      k < 0 || k >= GH->cctk_lsh[2--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2741/some-thorns-seem-to-incorrectly-use