bug-rcs
[Top][All Lists]
Advanced

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

Re: bug #41707: RCS 5.8 file corruption when using file descriptor IO fo


From: Achim Gratz
Subject: Re: bug #41707: RCS 5.8 file corruption when using file descriptor IO for large files
Date: Sun, 10 Aug 2014 20:00:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.91 (gnu/linux)

Thien-Thi Nguyen writes:
> I have added ephemeral branch "q-spurious-eof" w/ file src/z.c
> (see comments therein).  I'm not confident that it implements what
> you described; you will certainly have to debug it further.  Once
> we get it to reliably demonstrate buggy behavior (exit value 5),
> i'll convert it to a configure-time test.

I've had to change a few things to make it run (you can't execve with a
NULL environment on Windows since the loader won't find the libraries
then).  Also I've tried to make it conform more closely to what ci does
through calling runv.  In the end I could finally demonstrate the
failure (exit value 4, actually).  I've made the data file some odd
number of kiB so the various buffer sizes aren't obscured.  The child
must read at least 64kiB for the error to occur (that's what a stream
buffers, I think).  If the child reads to EOF (the commented loop
variant), then the parent just ends the first read with zero bytes,
i.e. it doesn't see the EOF until it actually tries to read.

In doing these experiments I had an idea for a far less intrusive patch.
The code that rewinds the file before diff actually doesn't need to keep
the stream and fd position the same before the runv call since runv only
inherits the fd.  Calling fro_bob _only after_ the runv call actually
gets the stream into a useable state, while calling it before and after
does apparently nothing (presumably because it already is at the same
position).

Attachment: 0001-fix-demonstrator-and-provide-a-different-patch-for-c.patch
Description: Text Data


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

reply via email to

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