The kernel mem subsystem and glibc are extremely well tested, it is
highly unlikely these are the cause of the problems.  User level app
bugs are by far the most likely explanation.

If hlp and hlp2 point to the same memory, they should behave the same
when accessed.  Unfortunately, the above printf statements do not prove
hlp and hlp2 are the same on a 64 bit system.

The printfs

printf("hlp :%x-\n", hlp);
printf("hlp2 :%x-\n", hlp2);

are printing the low 4 bytes of the 8 byte pointer values.  These should
be alterred to use %p, i.e.

printf("hlp :%p-\n", hlp);
printf("hlp2 :%p-\n", hlp2);

Only then can you know that hlp and hlp2 point to the same memory.

Secondly, the printf of the hlp2 value should be moved to immediately
before it is referenced, in the above code it is possible that

IP[255] = 0;

is corrupting hlp2 (if, for instance, IP is not 255 bytes long, IP[255] may be 
addressing a byte within the hlp2 pointer).
 

** Changed in: linux-source-2.6.20 (Ubuntu)
       Status: Confirmed => Needs Info

-- 
Segmentation Fault
https://bugs.launchpad.net/bugs/107180
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to