Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault with gcc > 7 #68

Open
sassy-crick opened this issue Jul 1, 2022 · 2 comments
Open

segfault with gcc > 7 #68

sassy-crick opened this issue Jul 1, 2022 · 2 comments
Labels

Comments

@sassy-crick
Copy link

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

@jiangdada1221
Copy link

The issue is fixed!! THanks

@nataliarinconv
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants