NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/46457: pipe2 with O_CLOEXEC craches the system



>Number:         46457
>Category:       kern
>Synopsis:       pipe2 with O_CLOEXEC craches the system
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 16 08:40:00 +0000 2012
>Originator:     Yui NARUSE
>Release:        6.99.5
>Organization:
>Environment:
NetBSD kelvena.airemix.net 6.99.5 NetBSD 6.99.5 (GENERIC) #0: Fri Nov 18 
08:35:28 JST 2011  
naruse%kelvena.airemix.net@localhost:/usr/obj/sys/arch/amd64/compile/GENERIC 
amd64
>Description:
Consuming fds by pipe2(fildes, O_CLOEXEC) and exit,
it crashes the system.
>How-To-Repeat:
#include <stdio.h>
#include <fcntl.h>
int main(void)
{
    int i;
    for (i=0; i < 200; i++) {
        int fildes[2];
        if (pipe2(fildes, O_CLOEXEC) == -1) {
            return 255;
        }
    }
    return 0;
}
>Fix:



Home | Main Index | Thread Index | Old Index