Code:
#include stdio.h #include sys/types.h #include sys/ipc.h #include sys/sem.h #define KEY 1942 main () { struct sembuf sbuf; int semid; semid = semget(KEY, 1, IPC_CREAT | IPC_EXCL | 0777); printf("semid = %d\n", semid); semctl(semid, 0, IPC_RMID); puts("destroyed semid"); }
Code:
==19854== Syscall param semctl(arg) points to uninitialised byte(s) ==19854== at 0xB8AA08: semctl@@GLIBC_2.2 (in /lib/tls/libc-2.3.4.so) ==19854== by 0x8048477: main (in ~/test/semtest) ==19854== Address 0xBEE053D4 is on thread 1's stack
Comment