'What is with these points values like 0x5555555?
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];
Solution 1:[1]
What are those 0x777777
I don't see any of those in the quoted output.
and 0x555555 values?
A place where I see 555555 is in the middle of the second column of the stack trace. That column contains the return address of the function.
All the ffffff and 555555 seem hard to explain.
They are just values of parts of the addresses in question. It's unclear why you think they are harder to explain than for example 79392a.
It is obvious that these points point to memory outside my process.
I disagree, except for this case:
linkval=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>,
0xffffffffffffffff wasn't mapped for your process. It's in kernel-space of virtual memory. User space addresses use only the lower 48 bits in x86-64. And reading from that address is what triggered the segfault.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |