From your comments:
It is very hard to debug (which is why I use printf
) because I fork and use processes (this is the server for the VoIP project I'm working on) and gdb did not work when I tried to monitor the child process.
Emphasis is mine.
I would not be surprised if the memory dynamically allocated for toCheck
never got into a forked process or was not done, but was somehow discarded / overwritten.
NEW INFO: if I comment on getLine(list, temp);
then it does not erase toCheck
, any thoughts?
This is the first time in your program that std::allocator
is required for the actual allocation of memory.
STL has never been developed with markup, so this is quite possible than simply does not work in this utility.
You can check what happens with the debugger. See What address memory is allocated for toCheck
, and what happens when memory is allocated for temp
, but it is deeply submerged.
Since it seems like you have problems with gdb, you can try resetting the addresses first ( printf("%x", &toCheck[0]);
).
source share