[Top][All Lists]

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

Re: large diversions broken on mingw

From: Eric Blake
Subject: Re: large diversions broken on mingw
Date: Sat, 09 Mar 2013 16:09:20 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3

On 03/09/2013 08:12 AM, Eric Blake wrote:
> Just a heads up that I'm trying to fix a bug in diversion handling,
> exposed by 'make check', but which only shows on mingw or other
> platforms where rename() can't change the name of an open file.  Most
> Unix systems are unaffected, and I doubt many people test on mingw,
> which is probably why no one has reported it even though I think the bug
> has been present for months.
> I'm still trying to ascertain whether released m4 has the bug, or
> whether it is a regression introduced by a recent gnulib update.  But
> the gdb session shows what is happening - if a diversion is large enough
> to spill to a file, the act of closing it prior to the rename happens to
> trigger a path that accidentally unlink()s the file.  I hope to have the
> patch posted by Monday.

More details - it looks like this has been around for a long time -
gnulib has used _O_TEMPORARY when opening files on mingw, which has the
effect of deleting the file on the first fclose().  But m4 needs the
file to exist even after we close it, which means we should not be using
_O_TEMPORARY.  I'm trying to figure out whether the patch needs to be in
gnulib, m4, or both.

Eric Blake   eblake redhat com    +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]