mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-12 22:24:53 +00:00
Check if Memcheck is able to recognize errors related to uninitialized parameters in ioctl(SIOCSPGRP / SIOCATMARK) calls. Test by Aleksandar Rikalo.
20 lines
276 B
C
20 lines
276 B
C
#include <arpa/inet.h>
|
|
#include <sys/ioctl.h>
|
|
#include <sys/socket.h>
|
|
#include <unistd.h>
|
|
|
|
int main()
|
|
{
|
|
pid_t pid;
|
|
int fd, atmark;
|
|
|
|
fd = socket(PF_INET, SOCK_DGRAM, 0);
|
|
|
|
ioctl(fd, SIOCSPGRP, &pid);
|
|
ioctl(fd, SIOCATMARK, &atmark);
|
|
|
|
close(fd);
|
|
|
|
return 0;
|
|
}
|