![]() |
От: |
Димчанский
|
http://dimchansky.github.io/ |
Дата: | 20.05.09 13:13 | ||
Оценка: |
typedef struct SHMReg
{
char a[11];
int b;
int c;
} MyReg;
MyReg *Reg;
...
// в одном из мест делается присваивание
// gcc на нем предупреждает:
// warning: cast to pointer from integer of different size
// warning: assignment from incompatible pointer type
Reg = (struct MyReg*)shmat(shmid, NULL, 0); // возвращает 0x57ca000
Есть подозрение, что функция shmat как-то не так используется.Program received signal SIGSEGV, Segmentation fault
si_code: 1 — SEGV_MAPERR — Address not mapped to object.