IGoR icon indicating copy to clipboard operation
IGoR copied to clipboard

segfault with gcc > 7

Open sassy-crick opened this issue 2 years ago • 2 comments

Describe the bug The program is segfaulting with more recent compilers, in particular with gcc 11.x.y

Additional context igor -run_demo results in a segfault Steps to reproduce the bug As above Expected behavior To fun the test program correctly

System information:

  • IGoR version: 1.4.0 / 1.4.2
  • OS: Debian Buster
  • Compiler and compiler version: gcc-11.2.0 and gcc-11.3.0

Compiling the code with newer, i.e. more recent compilers like gcc-11.2 or gcc-11.3 lead to a segfault in the demo program. The attached patch fixes this in Aligner.cpp, so the demo program can be used. This also fixes another problem in Utils.h. In Utils.h #include <string> is missing but I am sure you can patch that yourself. There are still some small buffer overflows, which you can see for yourself if you compile with the -g3 -fsanitize=address flags. See here for more information: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html

Thanks igor-1.4.0-c++-patch.txt

sassy-crick avatar Jul 01 '22 16:07 sassy-crick

The issue is fixed!! THanks

jiangdada1221 avatar Apr 26 '23 11:04 jiangdada1221

I had some issues with compiling but was able to successfully compile and run the demo (without seg fault) using intel 2020 c compiler.

./configure CC=icc CXX=icpc --prefix=path/to/directory

Hope this helps someone! :)

nataliarinconv avatar May 20 '24 14:05 nataliarinconv