delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=jFPI7rV/ZLf0AgGS7Dtfax31F6g+C10MiN+lx/Er8SjL1wRJmzDDn | |
2eX9v4LXjGfg3Qz6l7J55Q4HkMmgmHpZe5KjKjWMdjIGEDtQ53O9vG3Iyu7jDi8K | |
N/FtpzgVLzz7goBs1zRsAhMF+7zFSfMSw+8WznGaWiXMkK8Xy78A4U= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=ycZzqzdUWTNBGfQNzlE7Csosw3s=; b=ee2eJLtFMGqQgVtJGay8IYKb4K4r | |
Fb7neA8oKXeMaDuNKw6vk7RCUDlsL9pMt38k5fajNQcY7nWEsy2zK0bAk21ok+5/ | |
inMuUHL8XJZ1Qfmr4Tc9QZeRESYQCdqG5GzbBd4thKFJ99OENVBPJ5IjsUrp2tu0 | |
EZaMVW21ulE5DAE= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Mon, 12 Jan 2015 12:54:18 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: damaged version of qsort.c in the Cygwin library |
Message-ID: | <20150112115418.GD15213@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <201501112354 DOT t0BNsoMk039694 AT rs6 DOT risingnet DOT net> |
MIME-Version: | 1.0 |
In-Reply-To: | <201501112354.t0BNsoMk039694@rs6.risingnet.net> |
User-Agent: | Mutt/1.5.23 (2014-03-12) |
--UfEAyuTBtIjiZzX6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Jan 11 15:54, ddcc wrote: > Here what I have send to M. Douglas McIlroy :::::: Who's Douglas McIlroy? > The Cygwin library has a copy of qsort, which you published with Bentley > around 1993. Who's Bentley? Cygwin didn't even exists at all in 1993 and Cygwin has no own version of qsort. Rather, it uses the qsort implementation of Newlib. Newlib introduced qsort in 1992, but that version got replaced with the qsort implementation from NetBSD in 1995. > [...] > The code had been damaged by an "improvement" that invokes sometimes > insertionsort (not only at the begining), which causes quadratic Nothing at all was changed in the source code between the introduction of the NetBSD code in 1995 and 2014, when... > blow ups. I reported the problem to a 'volunteer', likely an employee > of RedHat. It turns out that now, years later the damaged version is > still in the Cygwin library. You can find it at: >=20 > https://sourceware.org/viewvc/src/newlib/libc/search/qsort.c?revision= =3D1.2&view=3Dmarkup >=20 > See the variable swap_cnt and the associated code for the damage. >=20 > I am NOT reporting the problem again (due to the way I was harassed > when I reported the defect) and leave it to you to take action. [Whatever that means] > See below for my fixed version. > I removed swap_cnt and the associated code. > I have also ordered the actions on the two partitions to minimize > stack space. > The second recursive call has been replaced. >=20 > The Cygwin version has other undocumented changes involving a > procedure qsort_r for which I have no appetite to even think about > it; software engineering at its worst. ...when Yaakov was so friendly to add the reentrant versions of qsort called qsort_r, which exist on BSD and GNU systems, but which you seem to have missed for some reason. If you have anything constructive to say, please follow up with a patch on the newlib mailing list newlib AT sourceware DOT org. While you're at it, maybe you could condescend to explain what the problem exactly is and why your solution is better. Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --UfEAyuTBtIjiZzX6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUs7XqAAoJEPU2Bp2uRE+gvqIQAJqsew+p9hMM/+poB8lguMy0 e5hvpPoD3uprSVWxqBY6cdDVoYrAG8p7r7bMaQHTsGP4JDYMsG+G+u4/E4O29g5w jrJPoZiVpSo17jsyvzs1+tpenRajCYTBj0sYz1duUseVM3eTnhJj+q+7h8iGFlCg VOX0op/Znt6IeOHe7ZeZqAqF4NQWy01MDYjxE3r5llkMyR9hQN678ekQcq2MzE0+ EvY0J78Z3MbYz2/mi60lfnVPIEoxYexr2xvPZI+JQ22919/BFkfGEvxNrRQ0NLN+ J7yPLhN+lMyi26xNVLlpSJxifonZxodHxYMM1zPIJFt404TkZDtbMWBRfDhdfvCu qF3/73+PU2wRDKYz87S4rbnG32ad2lcyKhVh+KkIypY435KcxTA5XzS5N/asuHhp X3gJ8l3FEtVDYu4aCC9yclNn2S67YyZU8afA65EZLzK0GqBEDmDmsMVUPg/dXvJo 9ueDm4rxiujbLiWyYcmbKDxNlAna4AODJyqmFtZlG8X9q05jwerXeOzVrlf3bkDo EzswYQVH0PQxh1PAIvN0aNKXRJy0L/2pxjV+3XKT+OsVsoRGOHZcwdlxLSXXlo1H rUNqV6Uz2uaazQUQe39DkSb60XQNOZM8ZCKDh1FQxMbrfZQI8ZKXbmoKtg1I5O0E HbNYPdZ0/Qu8Vd+x6ZYc =y3fg -----END PGP SIGNATURE----- --UfEAyuTBtIjiZzX6--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |