I have a core file from a linux c++ program, and it crashed with a segmentation fault. Looking at the backtrace and code, I find one pointer/object that could be garbage. The pointer address is this=0x62900000f200
, so is there a way I can determine if that could possibly be a valid address using GDB?
What I'm hoping for is a way to get GDB to tell me what allocated memory regions are, or what memory the core dump contains. I know accuracy will be low because its somewhat likely that a slightly mangled pointer could still point to "valid" memory, but hopefully there is a way to identify pointers that can't possibly be valid.
I have seen questions asking if a pointer "is valid" and I know the complexity of determining if a pointer as been free'd already, or if its point to the wrong object, etc, but that is not what I'm asking. I just want a test that would say, "This core contains all memory from address 0x01 to 0x50, and your pointer is 0x70, so its obviously not valid."