[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#187319: marked as done (locales: strxfrm of "aa" under bokmal gives valgrind errors)



Your message dated 23 Aug 2003 10:42:32 +0100
with message-id <1061631752.798.8.camel@kc.cam.armlinux.org>
and subject line Bug#187319: locales: strxfrm of "aa" under bokmal gives valgrind errors
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; 2 Apr 2003 20:18:34 +0000
>From nick@ccl4.org Wed Apr 02 14:18:33 2003
Return-path: <nick@ccl4.org>
Received: from mirth.demon.co.uk [80.177.10.131] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 190ogo-00048k-00; Wed, 02 Apr 2003 14:18:30 -0600
Received: by mirth.demon.co.uk (Postfix, from userid 1005)
	id BB2E434A77; Wed,  2 Apr 2003 21:18:33 +0100 (BST)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Nicholas Clark <nick@ccl4.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: locales: strxfrm of "aa" under bokmal gives valgrind errors
X-Mailer: reportbug 2.10.1
Date: Wed, 02 Apr 2003 21:18:33 +0100
Message-Id: <20030402201833.BB2E434A77@mirth.demon.co.uk>
X-BadReturnPath: nick@penfold rewritten as nick@ccl4.org
  using "From" header
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-0.2 required=4.0
	tests=HAS_PACKAGE,SPAM_PHRASE_00_01
	version=2.44
X-Spam-Level: 

Package: locales
Version: 2.3.1-16
Severity: normal


When calling strxfrm on "aa" under the bokmal locale, it seems that there is
some sort of uninitialized read occurring in glibc. (I was trying to debug
something else in perl, and found I had a valgrind warning). I can get it
down to this test program, which I believe is strictly ANSI conformant:

#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main (int argc, char **argv) {
    char *result;
    char buffer[256];

    argv++;
    if (!*argv)
        return 1;

    result = setlocale (LC_ALL, *argv);
    if (!result) {
        fprintf (stderr, "Could not set locale to '%s'\n", *argv);
        exit (1);
    }

    while (*++argv) {
        printf ("result for '%s' is %d\n", *argv,
                strxfrm (buffer, *argv, sizeof(buffer) - 1));
    }
    return 0;
}


when run this this under valgrind I see errors:

$ valgrind ./test_strxfrm bokmal aa
==6124== valgrind-1.0.4, a memory error detector for x86 GNU/Linux.
==6124== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
==6124== Estimated CPU clock rate is 1544 MHz
==6124== For more details, rerun with: -v
==6124==
==6124== Use of uninitialised value of size 4
==6124==    at 0x402A3477: strxfrm (in /lib/libc-2.3.1.so)
==6124==    by 0x80484B6: main (in /home/nick/test/test_strxfrm)
==6124==    by 0x4024AA51: __libc_start_main (in /lib/libc-2.3.1.so)
==6124==    by 0x804838D: (within /home/nick/test/test_strxfrm)
==6124==
==6124== Use of uninitialised value of size 4
==6124==    at 0x402A36E0: strxfrm (in /lib/libc-2.3.1.so)
==6124==    by 0x80484B6: main (in /home/nick/test/test_strxfrm)
==6124==    by 0x4024AA51: __libc_start_main (in /lib/libc-2.3.1.so)
==6124==    by 0x804838D: (within /home/nick/test/test_strxfrm)
result for 'aa' is 5
==6124==
==6124== ERROR SUMMARY: 4 errors from 2 contexts (suppressed: 0 from 0)
==6124== malloc/free: in use at exit: 0 bytes in 0 blocks.
==6124== malloc/free: 28 allocs, 28 frees, 1886 bytes allocated.
==6124== For a detailed leak analysis,  rerun with: --leak-check=yes
==6124== For counts of detected errors, rerun with: -v

I'm trusting that valgrind is correct, and that these warnings indicate
a real bug. In my experience valgrind always has been accurate in what it
reports.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux penfold 2.4.20 #1 Tue Apr 1 00:07:30 BST 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages locales depends on:
ii  debconf                       1.2.34     Debian configuration management sy
ii  libc6 [glibc-2.3.1-16]        2.3.1-16   GNU C Library: Shared libraries an

-- debconf information:
* locales/default_environment_locale: C
* locales/locales_to_be_generated: fa_IR.UTF-8 UTF-8, nl_NL ISO-8859-1, nl_NL.UTF-8 UTF-8, nl_NL.UTF-8@euro UTF-8, nl_NL@euro ISO-8859-15, no_NO ISO-8859-1, no_NO.UTF-8 UTF-8


---------------------------------------
Received: (at 187319-done) by bugs.debian.org; 23 Aug 2003 09:42:44 +0000
>From philb@gnu.org Sat Aug 23 04:42:33 2003
Return-path: <philb@gnu.org>
Received: from pc2-cmbg4-3-cust239.cmbg.cable.ntl.com (kc.cam.armlinux.org) [81.96.69.239] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 19qUum-00088o-00; Sat, 23 Aug 2003 04:42:33 -0500
Received: from localhost ([127.0.0.1])
	by kc.cam.armlinux.org with esmtp (Exim 3.36 #1 (Debian))
	id 19qUum-0000Dk-00
	for <187319-done@bugs.debian.org>; Sat, 23 Aug 2003 10:42:32 +0100
Subject: Re: Bug#187319: locales: strxfrm of "aa" under bokmal gives
	valgrind errors
From: Philip Blundell <philb@gnu.org>
To: 187319-done@bugs.debian.org
In-Reply-To: <[🔎] 20030823100923.K558@plum.flirble.org>
References: <[🔎] 20030812231601.GA2896@imacs.polytechnique.fr>
	 <[🔎] 20030823100923.K558@plum.flirble.org>
Content-Type: text/plain
Message-Id: <1061631752.798.8.camel@kc.cam.armlinux.org>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.3 
Date: 23 Aug 2003 10:42:32 +0100
Content-Transfer-Encoding: 7bit
Delivered-To: 187319-done@bugs.debian.org
X-Spam-Status: No, hits=-14.5 required=4.0
	tests=BAYES_20,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,
	      REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_XIMIAN
	autolearn=ham version=2.53-bugs.debian.org_2003_8_17
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_8_17 (1.174.2.15-2003-03-30-exp)

Submitter reports that this bug is fixed.

p.

On Sat, 2003-08-23 at 10:09, Nicholas Clark wrote:
> I can confirm that the same test binary no longer gives errors.
> This is on the same machine, but now with glibc 2.3.2 and valgrind 20030725.
> 
> Thank you for resolving this bug.




Reply to: