Bug#279044: libc6: qsort() doesn't sort for large size

2004-10-31 Thread Kurt Roeckx
On Sun, Oct 31, 2004 at 10:35:02AM +0100, Thomas Koenig wrote:
> int mycomp(void const *p1, void const *p2) {
> mydata const *v1, *v2;
> v1 = p1;
> v2 = p2;
> return (v1->key) < (v2->key);
> }

Change that return to return (v1->key) - (v2->key) and it will
work as expected.


Kurt



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#279044: marked as done (libc6: qsort() doesn't sort for large size)

2004-10-31 Thread Debian Bug Tracking System
Your message dated Sun, 31 Oct 2004 12:05:39 -0500
with message-id <[EMAIL PROTECTED]>
and subject line Bug#279044: libc6: qsort() doesn't sort for large size
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--
Received: (at submit) by bugs.debian.org; 31 Oct 2004 08:37:01 +
>From [EMAIL PROTECTED] Sun Oct 31 01:37:01 2004
Return-path: <[EMAIL PROTECTED]>
Received: from moutng.kundenserver.de [212.227.126.190] 
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1COBCv-0001p1-00; Sun, 31 Oct 2004 01:37:01 -0700
Received: from [212.227.126.207] (helo=mrelayng.kundenserver.de)
by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
id 1COBAy-0007aR-00
for [EMAIL PROTECTED]; Sun, 31 Oct 2004 09:35:00 +0100
Received: from [80.141.205.17] (helo=meiner.onlinehome.de)
by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1)
id 1COBAx-0001CM-00; Sun, 31 Oct 2004 09:34:59 +0100
Received: from ig25 by meiner.onlinehome.de with local (Exim 3.36 #1 (Debian))
id 1COC75-0001NU-00; Sun, 31 Oct 2004 10:35:03 +0100
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Thomas Koenig <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: libc6: qsort() doesn't sort for large size
X-Mailer: reportbug 3.1
Date: Sun, 31 Oct 2004 10:35:02 +0100
Message-Id: <[EMAIL PROTECTED]>
Sender: Thomas Koenig <[EMAIL PROTECTED]>
X-Provags-ID: kundenserver.de [EMAIL PROTECTED] auth:82006718d44785d1b0aefbb6e084916e
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: libc6
Version: 2.3.2.ds1-18
Severity: normal

$ cat mysort.c
#include 
#include 

#define DATASIZE 1800
#define NDAT 10
typedef struct {
int key;
char data [DATASIZE];
} mydata;

int mycomp(void const *p1, void const *p2) {
mydata const *v1, *v2;
v1 = p1;
v2 = p2;
return (v1->key) < (v2->key);
}

int main() {
int i;
mydata *p;

p = calloc(NDAT, sizeof(mydata));
for (i=0; i
#include 

#define DATASIZE 20
#define NDAT 10
typedef struct {
int key;
char data [DATASIZE];
} mydata;

int mycomp(void const *p1, void const *p2) {
mydata const *v1, *v2;
v1 = p1;
v2 = p2;
return (v1->key) < (v2->key);
}

int main() {
int i;
mydata *p;

p = calloc(NDAT, sizeof(mydata));
for (i=0; iFrom [EMAIL PROTECTED] Sun Oct 31 09:06:11 2004
Return-path: <[EMAIL PROTECTED]>
Received: from rwcrmhc11.comcast.net [204.127.198.35] 
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1COJ9f-0003Oy-00; Sun, 31 Oct 2004 09:06:11 -0800
Received: from parity.ne.client1.attbi.com 
(parity.ne.client2.attbi.com[24.128.51.141](misconfigured sender))
  by comcast.net (rwcrmhc11) with ESMTP
  id <2004103117054001300bqfbie>; Sun, 31 Oct 2004 17:05:40 +
Received: from localhost ([127.0.0.1])
by parity.ne.client1.attbi.com with esmtp (Exim 3.36 #1 (Debian))
id 1COJ99-0007v8-00
for <[EMAIL PROTECTED]>; Sun, 31 Oct 2004 12:05:39 -0500
Subject: Re: Bug#279044: libc6: qsort() doesn't sort for large size
From: Jeremy Nimmer <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Content-Type: text/plain
Message-Id: <[EMAIL PROTECTED]>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.6 
Date: Sun, 31 Oct 2004 12:05:39 -0500
Content-Transfer-Encoding: 7bit
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Thomas,

In general, it's unlikely that anything you think is a libc bug is
really a libc bug, especially for something like a severe functional
problem like "qsort() doesn't sort".

In this case, it's your bug:

On Sun, 2004-10-31 at 04:35, Thomas Koenig wrote:
> int mycomp(void const *p1, void const *p2) {
> mydata const *v1, *v2;
> v1 = p1;
> v2 = p2;
> return (v1->key) < (v2->key);
> }

The above is an incorrect comparison routine.  Did you read the qsort
man page?  Is says, in part:

   

Re: Replacement of the locales package

2004-10-31 Thread Denis Barbier
On Mon, Oct 25, 2004 at 10:52:51PM +0100, Edmund GRIMLEY EVANS wrote:
> Denis Barbier <[EMAIL PROTECTED]>:
> 
> > > The name is very questionable. Could you please replace it with
> > > "eo_XX" for now, and with "eo" if that ever becomes possible?

It looks like "eo" does work, what trouble do you have with it?

> > Makes sense, I'll do that in the belocs-locales-data package.
> > Do you believe that an eo_EO alias should also be provided, or do
> > you want only one eo_* locale available?
> 
> I think the eo_EO alias would be moderately useful.
> 
> > In order for this locale to be available, it must be added to
> > /usr/share/i18n/SUPPORTED.  Are these entries correct?
> >   eo_XX UTF-8
> >   eo_XX.ISO-8859-3 ISO-8859-3
> 
> Yes. UTF-8 is definitely more popular nowadays.

The problem is that encoding of locales should never change in order
to prevent compatibility problems.  At the moment I added
eo_XX.ISO-8859-3 and eo_XX.UTF-8 into belocs-locales-data, with aliases
for eo_EO locales, but did not define eo_XX.

Denis


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#278426: libc6: memcpy is ignoring the size-parameter

2004-10-31 Thread Thomas Dickey
On Sat, 30 Oct 2004, Daniel Jacobowitz wrote:

> On Tue, Oct 26, 2004 at 05:31:10PM -0400, Thomas Dickey wrote:
> > My guess is that some change to memcpy modified its logic to copy words
> > (or larger chunks) rather than bytes has been broken.
> >
> > Alternatively, valgrind is broken (it's hard to tell).
>
> More likely valgrind.  Do you have a stand-alone executable testcase?

no - it may still be there if I setup one, but I didn't do that (am
working on something to finish next week).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#279044: libc6: qsort() doesn't sort for large size

2004-10-31 Thread Thomas Koenig
Package: libc6
Version: 2.3.2.ds1-18
Severity: normal

$ cat mysort.c
#include 
#include 

#define DATASIZE 1800
#define NDAT 10
typedef struct {
int key;
char data [DATASIZE];
} mydata;

int mycomp(void const *p1, void const *p2) {
mydata const *v1, *v2;
v1 = p1;
v2 = p2;
return (v1->key) < (v2->key);
}

int main() {
int i;
mydata *p;

p = calloc(NDAT, sizeof(mydata));
for (i=0; i
#include 

#define DATASIZE 20
#define NDAT 10
typedef struct {
int key;
char data [DATASIZE];
} mydata;

int mycomp(void const *p1, void const *p2) {
mydata const *v1, *v2;
v1 = p1;
v2 = p2;
return (v1->key) < (v2->key);
}

int main() {
int i;
mydata *p;

p = calloc(NDAT, sizeof(mydata));
for (i=0; i