FPChecker icon indicating copy to clipboard operation
FPChecker copied to clipboard

Function pointers should not be instrumented

Open ilagunap opened this issue 4 years ago • 1 comments

This was incorrectly instrumented:

This line: fptr[idx_dst] = (*fine_volumes)(SAMRAI::pdat::CellIndex(*bi)); Became: fptr[idx_dst] = _FPC_CHECK_((*fine_volumes)(SAMRAI::pdat::CellIndex(* bi), ), 125, “..ineOperator.cxx”);

Here a function pointer is assigned to an array element.

ilagunap avatar Mar 12 '20 19:03 ilagunap

The problem here is not that the function pointer was instrumented (it returns a double value, os it's fine). The problem is the extra comma "," that is added. Without a reproducible this is hard to fix.

ilagunap avatar Mar 12 '20 22:03 ilagunap