jpuigcerver/rnn2d

Free invalid pointer with Torch and tcmalloc

jpuigcerver opened this issue · 0 comments

When I compile the library using tcmalloc and try to use the torch bindings I get a core dump due to an invalid free pointer. The error does not occur when compiled using the default malloc/new/free/delete functions.

$ RNN2D_LIBCPU_PATH=../../build/src/librnn2d_cpu.so RNN2D_LIBGPU_PATH=../../build/src/librnn2d_gpu.so th demo_tiny_ctc.lua 
src/tcmalloc.cc:278] Attempt to free invalid pointer 0xba3eb0 
Aborted (core dumped)

I have disabled the compilation with tcmalloc by default. Use CMake's variable WITH_PERFTOOLS in order to compile with Perftools support.