From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-patches@cygwin.com
Subject: Re: fix off-by-one in dup2
Date: Wed, 04 Dec 2013 12:04:00 -0000 [thread overview]
Message-ID: <20131204120408.GC29444@calimero.vinschen.de> (raw)
In-Reply-To: <20131204113626.GB29444@calimero.vinschen.de>
[-- Attachment #1: Type: text/plain, Size: 981 bytes --]
On Dec 4 12:36, Corinna Vinschen wrote:
> On Dec 4 10:32, Corinna Vinschen wrote:
> > Hi guys,
> > [...etc...]
> > The problem is still present in the current sources.
> > [...]
Ouch, ouch, ouch! I tested the wrong DLL. Actually current CVS fixes
this problem. Duh. Sorry for the confusion.
One question, though. Assuming start is == size, then the current code
in CVS extends the fd table by only 1. If that happens often, the
current code would have to call ccalloc/memcpy/cfree a lot. Wouldn't
it in fact be better to extend always by at least NOFILE_INCR, and to
extend by (1 + start - size) only if start is > size + NOFILE_INCR?
Something like
size_t extendby = (start >= size + NOFILE_INCR) ? 1 + start - size : NOFILE_INCR;
?
Sorry again. Fortunately it's my WJM week...
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-12-04 12:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-25 23:26 Eric Blake
2013-10-15 14:06 ` Christopher Faylor
2013-10-15 20:45 ` Yaakov (Cygwin/X)
2013-10-15 22:34 ` Christopher Faylor
2013-10-16 7:40 ` Yaakov (Cygwin/X)
2013-11-23 13:19 ` Eric Blake
2013-12-04 9:32 ` Corinna Vinschen
2013-12-04 11:36 ` Corinna Vinschen
2013-12-04 12:04 ` Corinna Vinschen [this message]
2013-12-04 17:00 ` Christopher Faylor
2013-12-04 17:23 ` Corinna Vinschen
2013-12-04 17:51 ` Christopher Faylor
2013-12-04 19:44 ` Corinna Vinschen
2013-12-05 13:45 ` Eric Blake
2013-12-05 19:56 ` Christopher Faylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131204120408.GC29444@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin-patches@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).