delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/08/31/14:01:46

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D4ED8386F47F
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=towo.net
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo AT towo DOT net
Subject: Re: cygwin qsort erratic
To: cygwin AT cygwin DOT com
References: <CAHybJinLYpcviSFiJ=V-EZqoatEzjFfr9DOUzxzmofUmtwMS+w AT mail DOT gmail DOT com>
<c9792fdc-aedc-6934-e11f-732f841b533b AT SystematicSw DOT ab DOT ca>
<CAHybJi=+uKitmwhWfuc564xz6qxZF+H=rA87LaB1NBJPkBAsUA AT mail DOT gmail DOT com>
From: Thomas Wolff <towo AT towo DOT net>
X-Tagtoolbar-Keys: D20200831200057947
Message-ID: <1464bc69-4dd5-b63d-d1b9-048b52fe036e@towo.net>
Date: Mon, 31 Aug 2020 20:00:58 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.12.0
MIME-Version: 1.0
In-Reply-To: <CAHybJi=+uKitmwhWfuc564xz6qxZF+H=rA87LaB1NBJPkBAsUA@mail.gmail.com>
X-Provags-ID: V03:K1:147Hr26krOzvjVo+yxXxkRecQ4dxTYLSGs3g4Ks41sC7y93zajH
nC/eBsqsq9J6qDtmN9yFJIWGnViNdm9XDsFrRo+KAenkAZ+v4qMdn/HeX3OecScXsXfPY/I
fFZQSQlA7aWLkjY+ImkyFezktXlGXFYFWSIzvDtaytC/xIykedU5olVf/LA+qjDNn50qg/n
JGeSOt0cnP27c9ujhbp9g==
X-UI-Out-Filterresults: notjunk:1;V03:K0:HzqaqmFcrLw=:faFwgsXEQHh0pp5kYNBkqc
579eluLWBQBK+A5pTh51A8vZ5VjkzcXUuUuCrA3dbrtEMzYNHCbv/UyIPCIaDEs+5UL1LBoKs
m9/W/Y7/g4LncGkygC2mGzf6j+sjf+MkU8T1eaIXCoUhAgEkdz4prSd30SWOEgVfDk+NyXCh+
lUH9JtmVh33fVclPOWon+Z/w1u3MoECWW9cprbGEy3Zvk0M90bSxPmmWX+ijYKkjpS3h2f944
MpXhwwW2/k62yaaE5Jk+Kw4+yZ4FpM1frrOYuBtfxB7YesDCMBdy4pz0LJyvsnagzErKc/ZEP
gWdM0LUNe1m52eMfUup/Z+iI16B7M9YicbRkkYrA1hrN/BIAm+STnuASOl3S3Nq8ttQ0GUGtT
O7YJc9Bi77oFqVf5PWHG2IUJxJYIQkFmMIew1lgq/vNAXBn3CwrxF5iSIM2V4hJQpcWTEIerl
1k4i7SM6tPb2Sa9o9Nd91ye2WQghNsPjmc9MI031QG0dZQMvwtVMvBPteOm+pc/fVx64rU6HM
Icv7D8vtXDOAIqnZbSqjilO3K3x+REpgSZFC1MsS1EMU1WFcrF8zQH7YOAcTjMY70KDdpoQo8
umV+wkwYeKmA2gaSWgnXMcujNITWauzn0gkfq+luQK1L9a5MAZpAY4EK5aDJo0KHXg81WfJMB
TleAQSX98nwCzX9s0nUpiuAGVABGdVCuYEoqiaB0mKnzHPA5Ldxn5vNDb1CjMyFi8v9rQaw/W
lsJFCK0gxKobKtUU8ly7qs/ldrfCDkzpwJT3Z3LBRkeiK9PA28YqCyERKtMLnDWfTFnXmLoPF
O8200Hb4LyBqNpPP1XojNnDgUMBxYB2uNqYp3KM+P/izDIGO3VSqpEsxShIrhljMiR4Wy9/
X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HTML_MESSAGE,
KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE,
RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

Am 31.08.2020 um 19:50 schrieb Kurt-Karen Carlson-Lougheed via Cygwin:
> Brian,
> It's difficult to produce a simple test case with erratic behavior. I have
> wrapped my qsort invocations within a qqsort routine. I've attached
> qqsort.h which includes both the wrapper and the netbad qsort.c renamed as
> Qsort (and with _DIAGASSERT's commented out). Also attached is cygsort.txt
> which is script output demonstrating the problem. My apologies that is 200+
> lines, the Verbose mode states whether Qsort (netbsd) or qsort (cygwin) is
> being invoked, I added the '$' command to toggle back and forth. Descending
> sorts on the D/C (dpc) column have been most problematic. The descending
> '+S dpc' after the ascending '+s dpc' is the most graphic example. I did
> publish uac19 v3.3 on SourceForge this morning, or I can send somebody a
> tgz.
Kurt-Karen, this is hard to comprehend. It is common practice that 
someone who claims something is buggy, especially about something 
essential like qsort, should demonstrate that claim with a reproducible 
test case, even if, as you say, it may be difficult to produce one. If 
this happens in a series of invocations you have it should be possible 
to identify one case with wrong results and reproduce its input and 
invocation scenario.
Thomas

>
> Corinna,
> I'm a cygwin user and neither a cygwin nor netbsd developer. I do not know
> what newlib or 'git format-patch' are. If I had access to source for
> cygwin's qsort  I could probably devise a patch, but it's probably better
> for somebody familiar with the tools cygwin uses to do that. The attached
> qqsort.h is an easy geek read. That qsort works with Linux/RHEL7 and with
> netbsd's version under cygwin should make fixing it straight forward for
> somebody in the know.
>
> Regards, Kurt
>
> On Sun, Aug 30, 2020 at 7:55 PM Brian Inglis <
> Brian DOT Inglis AT systematicsw DOT ab DOT ca> wrote:
>
>> On 2020-08-30 15:27, Kurt-Karen Carlson-Lougheed via Cygwin wrote:
>>> In a small percentage of qsort requests, the results are erratic. Running
>>> the same code under Linux (RHEL7) does NOT have this problem. I updated
>> my
>>> cygwin to current and the problem persists. I copied the latest
>> netbsd.org
>>> qsort.c and compiled into my code, the problem is resolved with that
>>> version of qsort.
>>>
>>> In researching this issue, there was a post to this list 2015-01-11
>>> reporting a
>>> 'damaged' qsort. This may still be the same issue. The netbsd version I
>> am
>>> now using is dated 2017-05-19.
>>>
>>> My code experiencing this is SourceForge uac19, I'll be posting the
>>> corrected version (v3.2) with the netbsd qsort tomorrow after completing
>>> validation tests. I would ultimately like to see cygwin's qsort fixed.
>> As qsort depends on the array object data types and comparison functions,
>> please
>> post a Simple Test Case, showing at least those types and function(s), and
>> the
>> faulty output results.
>>
>> --
>> Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
>>
>> This email may be disturbing to some readers as it contains
>> too much technical detail. Reader discretion is advised.
>> [Data in IEC units and prefixes, physical quantities in SI.]
>> --
>> Problem reports:      https://cygwin.com/problems.html
>> FAQ:                  https://cygwin.com/faq/
>> Documentation:        https://cygwin.com/docs.html
>> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
>>
>>
>> --
>> Problem reports:      https://cygwin.com/problems.html
>> FAQ:                  https://cygwin.com/faq/
>> Documentation:        https://cygwin.com/docs.html
>> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019