I've not used C++ in ages, Maybe something changed. I have a large program I did not write but need to use and it seems to randomly segfault, So I re-build with "-g" option and run in gdb. (I'm using Ubuntu 20 in Intel 64-bit)
When the fault happens, I get gdb output that if I were smarter would tell be something. My question is "What are those 0x777777 and 0x555555 values?" They do not seem like random values. Where could they come from? It is obvious that these points point to memory outside my process.
Here is an example of this from "gdb's backtrace"
12 0x000055555579392a in main (argc=2, argv=0x7fffffffde38) at mainSystem.cpp:3676
Here is what I see at the breakpoint. When I see "0x7fffffff75b8" All the ffffff and 555555 seem hard to explain.
Program received signal SIGSEGV, Segmentation fault.
0x00005555556c01d1 in UnpackHeapval (
linkval=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>,
val1=@0x7fffffff75b8: 18446744073709551615, val2=@0x7fffffff75c0: 18446744073709551615,
val3=@0x555555aa8218: 18446744073709551615) at os.cpp:706
706 val1 = data[1];