hello:
This is a mail from china.
Using your System() for a project, I find a bug about the share memory.
The share memory in your system working like this:
the A,B process:
A create the share memory using the struct temp:
strcut temp
{
char *p;
char ch;
};
p = &ch;
ch = 'a';
the share memory will be like this:
addr data content
....
0x0F00AB00 (p)0x0F00AB04
0x0F00AB04 (ch)'a'
....
if process B get the same Share memory with shmat(shmid,0,0);
like this
addr data content
0x0D002400 (p)0x0F00AB04
0x0D002404 (ch) 'a'
Using the p in process B, maybe I will get a “segmentation fault”
if process B get the same Share memory with shmat(shmid,addr,SHM_REMAP);
//addr is the address of share memory of A;
sometimes i will get the segmentation fault in the sentence(shmat) and
process dump;
It's very nice that if you can solve this problem asap!
YOURS
keqi zhang
2007 11 13
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils