This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

96 bit pointer reset only the least 64 bits


Hello,

I have a strange problem with setting pointers to 0. It happens in a 64 bit environment.

I am using a big package (which I know very little about) and get it to crash.
I can narrow the problem to some function that handles a pointer and on returning from the function the pointer is changed (I completely don't understand how is it possible that returning from a function can change the pointer unless there is some memory leak).


The thing is, when I print the pointer using printf instead of getting 8 chars I get 12 chars.
The change that is done to the pointer is that the least 64 bits are set to 0 and the top 32 bits remain unchanged (which could make some sense if this memory was deallocated by some side effect that I don't see).
Furthermore, when I compare this pointer to 0 I get that it is not 0 (and in my opinion this is what causes the program to crash).


Does this ring a bell to anyone?

Thanks,
Nir


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]