[Top][All Lists]

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

Re: test-dup3.c:108: assertion failed

From: Eric Blake
Subject: Re: test-dup3.c:108: assertion failed
Date: Tue, 09 Oct 2012 08:18:21 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

On 10/09/2012 03:05 AM, Richard W.M. Jones wrote:
> On Tue, Oct 09, 2012 at 09:54:45AM +0100, Richard W.M. Jones wrote:
>> The F_DUPFD_CLOEXEC fix that Al Viro posted fixes 3/4 of the
>> bugs, but I'm still investigating this one:
>>> test-dup3.c:108: assertion failed
>>> #      ASSERT (dup3 (fd, fd, o_flags) == -1);
> Thanks to Jim for pointing out this is a kernel bug, because the
> proposed standard for dup3 specifies that fd1 != fd2 else error:
> http://austingroupbugs.net/view.php?id=411

I agree that it is a regression in behavior, and wrote that Austin Group
wording based on the previous Linux behavior.  However, rather than
claiming it is a kernel bug, we must also consider whether it should be
fixed in glibc; after all, if the kernel is easier to implement dup2 and
dup3 alike (with no special casing of dup-to-self), it's not too hard
for glibc to special-case a dup-to-self check without even calling into
the kernel.

Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]