The following code reproduces the bug:

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>

int main(void)
{
        char path[1024];
        int fd;
        const pid_t pid = getpid();
        char buffer[1];

        snprintf(path, sizeof(path), "/proc/%d/task/%d/attr/context",
pid, pid);

        fd = open(path, O_RDWR);
        if (fd >= 0) {
                (void)write(fd, buffer, 0);
                (void)close(fd);
        }
}

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1720779

Title:
  linux 4.13.0-13.14 ADT test failure with linux 4.13.0-13.14

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1720779/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to