Page 1 of 1

Backtrace_SIGSEGV signal

Posted: Fri Sep 06, 2019 2:07 pm
by C0st4s
Hi,

Hope you are well.
What is the easiest way to trace the array that is causing SIGSEGV signal (forbidden memory area access) intercepted! in cs? I am writing some module routines and I am trying to find the root of the error.

Best regards,
Costas

Re: Backtrace_SIGSEGV signal

Posted: Fri Sep 06, 2019 10:48 pm
by Yvan Fournier
Hello,

First, use a version compiled in debug mode.

Second, check backtraces (not always exploitable to the last line, but usually helpful).

Finally, run "cs_solver" under a debugger, such as gdb. Checking the code under Valgrind is highly recommended (note the GUI advanced run settings page helps you run under a debugger, so check it).

If you have not already done so, this usually saves you orders of magnitude in time. This is recommended even when the code seems to work, because "hidden errors" may come back to bite you later, and the earlier they are detected, the less time wasted...

Best regards,

Yvan

Re: Backtrace_SIGSEGV signal

Posted: Sat Sep 07, 2019 10:23 pm
by C0st4s
Dear Yvan,

Thanks a lot for the quick reply. I had a division by zero


Best regards,
Costas