Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 22 Sep 2012 10:26:54 +0200 (CEST)
From: Jens <jensl@...s.mine.nu>
To: musl@...ts.openwall.com
Subject: semtcl for x86_64


Hello I have some trouble getting semctl working:

Tried in both musl and uclibc to compare.
See below.

The only difference I can see is the IPC_64 flag.

(I haven't tried 32-bit).

Regards,
Jens

program:
bash-4.1# cat t.c
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>

main() {
 	int sem;
//  semget(IPC_PRIVATE, 1, IPC_CREAT|0600) = 131076
   sem = semget(IPC_PRIVATE, 1, IPC_CREAT);
   semctl(sem, 0, SETVAL, 0x1);

}

musl:

bash-4.1# /bin64/strace ./m
execve("./m", ["./m"], [/* 19 vars */]) = 0
semget(IPC_PRIVATE, 1, IPC_CREAT|0)     = 327688
semctl(327688, 0, IPC_64|SETVAL, 0x1)   = -1 EINVAL (Invalid argument)
exit_group(-1)                          = ?
bash-4.1#


uclibc:

semget(IPC_PRIVATE, 1, IPC_CREAT|0)     = 262150
semctl(262150, 0, SETVAL, 0x1)          = 0
_exit(0)                                = ?
bash-4.1#

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.