During the generation of kernels around (nearly) all cpp kernels a call to preKernelInstrumentation(int, DaphneContext) and postKernelInstrumentation(int, DaphneContext) are placed. This causes a use after free in postKernelInstrumentation for the destroyDaphneContext kernel, as it takes the just destroyed ctx as one of its arguments.
There should be an exception for this kernel in genKernelsInst.py, as already present for createDaphneContext.
When running valgrind on the test suite, one of the issues that come up is a use after free in the cli section of the tests.
use_after_free.txt
During the generation of kernels around (nearly) all cpp kernels a call to preKernelInstrumentation(int, DaphneContext) and postKernelInstrumentation(int, DaphneContext) are placed. This causes a use after free in postKernelInstrumentation for the destroyDaphneContext kernel, as it takes the just destroyed ctx as one of its arguments.
There should be an exception for this kernel in genKernelsInst.py, as already present for createDaphneContext.