AstrOmatic forum
"double free or corruption" error when built against MKL - Printable Version

+- AstrOmatic forum (https://www.astromatic.net/forum)
+-- Forum: AstrOmatic software (/forumdisplay.php?fid=3)
+--- Forum: PSFEx (/forumdisplay.php?fid=21)
+--- Thread: "double free or corruption" error when built against MKL (/showthread.php?tid=1149)



"double free or corruption" error when built against MKL - luvaul - 03-26-2020 06:41

On our system, running PSFEx built against MKL (./configure --enable-mkl) produces this error: '(Abort) double free or corruption'

Rebuilding with debugging symbols (icc -debug full) in gdb shows that it's dying on line 158 of homo.c: free(fbigbasis);
Changing this to QFFTWFREE(fbigbasis); fixes the problem.

I'm surprised this works because QFFTWFREE macro expands to fftwf_free, which MKL defines as: void fftwf_free(void* x) {free(x);}
So it would seem free(fbigbasis) is the same as fftwf_free(fbigbasis), but obviously not.

Am I doing something wrong in my Makefile or in my environment?
With CC=icc and CFLAGS=' -O2 -Wall', we build like this:
autoconf -o configure configure.ac
./configure --enable-mkl
make

Thanks for any suggestions/advice. (I also created a ticket for this: https://astromatic.net/redmine/issues/1367)