I am running a cpp program in ubuntu. I am getting a signal SIGSEGV, Segmentation fault.
I tried to use gdb to see the exact line for segmentation fault. I get this idea from this thread of question:
Determine the line of code that causes a segmentation fault?
The gdb is returning me this:
Thread 1 "incremental_sat" received signal SIGSEGV, Segmentation fault.
0x00007ffff7857c50 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
Please see the screenshot of the terminal below:
I am using data structure involving all types of vector and unordered_map for int and string.
Can I know, which all lines of code is responsible for this error?
I am new to debugging in CPP. Any suggestion for the direction I can proceed with this info?
UPDATE: after the suggestion of running "bt" command, I am adding the output:
I am observing that it is getting segmentation fault just after calling cnf_transformation_out_diff() function. As it is not even printing the first cout command written in cnf_transformation_out_diff() function.