qmarcou / IGoR

IGoR is a C++ software designed to infer V(D)J recombination related processes from sequencing data. Find full documentation at:
https://qmarcou.github.io/IGoR/
GNU General Public License v3.0
47 stars 25 forks source link

segfault with gcc > 7 #68

Open sassy-crick opened 2 years ago

sassy-crick commented 2 years ago

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:

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

jiangdada1221 commented 1 year ago

The issue is fixed!! THanks

nataliarinconv commented 2 months ago

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! :)