cygwin qsort erratic

Thomas Wolff towo@towo.net
Tue Sep 1 22:00:48 GMT 2020


Am 01.09.2020 um 22:29 schrieb Kurt-Karen Carlson-Lougheed via Cygwin:
>    Brian:
> 1. The Qsort() source I sent was from netbsd.org, NOT cygwin. netbsd works.
> 2. Complete package is on SourceForge as uac19 v3.3. I'm happy to send a
> tgz if you prefer that. Read 3 choices at end before considering this.
> 3. Data is curl'd from owid as shown in the script example. Likewise I can
> send a sample data set. The program analyzes COVID-19 csv files from either
> owid or github/nytimes
> 4. I've used qsort() for years. I agree, keeping the sort routines simple
> is always appropriate. I confirmed today the only ones that fail include
> float divides, lDsort() and lXsort() in attached c19sort.c. When it's
> pre-calculated and added to the struct it works, the code has a toggle now
> for testing that.
>
> Thomas:
> I tried (again) today  to build a simple test case. The data structures in
> use are complex, probably the only thing I can attempt is stripping down
> the code which will be very time consuming. I know you don't know me at
> all, but I've written code, debugged proprietary operating systems
> (assembler), performed OS dump analysis, troubleshot intermittent hardware
> issues, identified disk firmware issues causing intermittent data
> corruption, identified nfs performance issues, managed large hpc clusters,
> etc. etc. etc. over 40+ years.
Your code does not even compile. I did not ask for a minimal test case 
although that is generally appreciated. But a working test case at least 
is required to establlish your claim of a bug.
>
> I see three choices:
> A. One of you look at simple the qqsort wrapper. I modified my code to
> toggle between the functional netbsd Qsort() and cygwin qsort(). I have
> demonstrated erroneous results coming from the cygwin version in a small
> percentage of requests. If you can acknowledge that, perhaps you can check
> the cygwin version of qsort() vs. the current netbsd.org?
> B. If you could kindly provide me or point me to the cygwin qsort() source
> I'll check it out myself.
> C. We can thank each other and leave cygwin's qsort() as is broken in some
> small number of circumstances since I've compiled netbsd's into my code and
> that always works.
>
> Regards, kurt


More information about the Cygwin mailing list