1261 static PyObject *
1262 PyShm_create_semaphore(
1263 PyObject *self,
1264 PyObject *args)
1265 {
1266 long key;
1267 int semid;
1268 int value = 1;
1269 int perm = 0666; /* Default permission is -rw-rw-rw- */
1270 semctl_arg arg;
1271
1272 if (!PyArg_ParseTuple(args, "l|ii", &key, &value, &perm))
when PyArg_ParseTuple() succeeds
taking False path
1273 return NULL;
1274 semid = semget((key_t)key, 1, perm | IPC_CREAT | IPC_EXCL);
1275 arg.val = value;
1276 if (!((semid != -1) &&
when considering range: -0x80000000 <= value <= -2
taking False path
1277 (semctl(semid, 0, SETVAL, arg) != -1)))
passing uninitialized data (arg) as argument 4 to function at src/extensions/shmmodule.c:1277
found 1 similar trace(s) to this
1278 return PyShm_Err();
1279 return PyShm_semaphore(self, Py_BuildValue("(i)", semid));
1280 }