Your message dated Fri, 23 Sep 2005 23:10:29 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Bug#329785: libc6: dirname() fails with sig11 on amd64 (x86_64)
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; 23 Sep 2005 11:18:58 +0000
>From [EMAIL PROTECTED] Fri Sep 23 04:18:58 2005
Return-path: <[EMAIL PROTECTED]>
Received: from ltw.loris.tv [217.160.108.140] 
        by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
        id 1EIlZx-0005oI-00; Fri, 23 Sep 2005 04:18:57 -0700
Received: from localhost (ltw.loris.tv [127.0.0.1])
        by ltw.loris.tv (Postfix) with ESMTP id CFA1023CEC0
        for <[EMAIL PROTECTED]>; Fri, 23 Sep 2005 13:18:55 +0200 (CEST)
Received: from ltw.loris.tv ([127.0.0.1])
        by localhost (ltw [127.0.0.1]) (amavisd-new, port 10024) with LMTP
        id 15037-01-2 for <[EMAIL PROTECTED]>;
        Fri, 23 Sep 2005 13:18:45 +0200 (CEST)
Received: from drcomp.erfurt.thur.de (drcomp-eth1.loris.tv 
[IPv6:2001:6f8:1318:3::2])
        (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
        (No client certificate requested)
        by ltw.loris.tv (Postfix) with ESMTP id 6C81323CEBF
        for <[EMAIL PROTECTED]>; Fri, 23 Sep 2005 13:18:45 +0200 (CEST)
Received: from drcomp.erfurt.thur.de ([EMAIL PROTECTED] [127.0.0.1])
        by drcomp.erfurt.thur.de (8.13.4/8.13.2) with ESMTP id j8NBJNSx032418;
        Fri, 23 Sep 2005 13:19:23 +0200
Received: (from [EMAIL PROTECTED])
        by drcomp.erfurt.thur.de (8.13.4/8.13.1/Submit) id j8NBJME7032417;
        Fri, 23 Sep 2005 13:19:22 +0200
Message-Id: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Adrian Knoth <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: libc6: dirname() fails with sig11 on amd64 (x86_64)
X-Mailer: reportbug 3.15
Date: Fri, 23 Sep 2005 13:19:22 +0200
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ltw.loris.tv
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

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


As already assumed in bug #329719
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=329719>

the dirname()-function is erroneous, at least on amd64:
it ends up with sig11 (segfault).

If you want to reproduce the problem, compile and run this
little program on x86_64:

#include <stdio.h>
int main (void) {
    printf ("%s\n", dirname ("/home/adi/core"));
    return 0;
}

Using gdb (and a copy of dirname.c from glibc-source) it shows that
the error is caused by line 72 in dirname.c:

Program received signal SIGSEGV, Segmentation fault.
0x00000000004006d3 in dirname2 (path=0x40083e "/home/adi/core") at dirname.c:72
72            last_slash[0] = '\0';

(note: I've renamed my local dirname-copy to dirname2, but it is the same
 as in glibc)

The same problem also exists on Suse-x86_64, so a possible fix
or the problem itself should probably reported to upstream.

(note: I'm using reportbug on my i386 as the amd64 has no usable
 mail connectivity)


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (900, 'testing'), (50, 'unstable')
Architecture: i386 (i586)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages libc6 depends on:
ii  libdb1-compat                 2.1.3-7    The Berkeley database routines [gl

libc6 recommends no packages.

-- no debconf information

---------------------------------------
Received: (at 329785-done) by bugs.debian.org; 23 Sep 2005 21:10:58 +0000
>From [EMAIL PROTECTED] Fri Sep 23 14:10:58 2005
Return-path: <[EMAIL PROTECTED]>
Received: from mail.enyo.de [212.9.189.167] 
        by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
        id 1EIuos-0002Xb-00; Fri, 23 Sep 2005 14:10:58 -0700
Received: from deneb.vpn.enyo.de ([212.9.189.177] helo=deneb.enyo.de)
        by albireo.enyo.de with esmtp id 1EIuok-00026g-Pq; Fri, 23 Sep 2005 
23:10:51 +0200
Received: from fw by deneb.enyo.de with local (Exim 4.52)
        id 1EIuoP-0007FE-Fc; Fri, 23 Sep 2005 23:10:29 +0200
From: Florian Weimer <[EMAIL PROTECTED]>
To: Adrian Knoth <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: Re: Bug#329785: libc6: dirname() fails with sig11 on amd64 (x86_64)
References: <[EMAIL PROTECTED]>
Date: Fri, 23 Sep 2005 23:10:29 +0200
In-Reply-To: <[EMAIL PROTECTED]> (Adrian
        Knoth's message of "Fri, 23 Sep 2005 13:19:22 +0200")
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

* Adrian Knoth:

>     printf ("%s\n", dirname ("/home/adi/core"));

This is incorrect code; the dirname function may modify its argument.
POSIX says:

| The dirname() function may modify the string pointed to by path, and
| may return a pointer to static storage that may then be overwritten
| by subsequent calls to dirname().

(Maybe the GNU libc documentation can be improved, though.)


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

Reply via email to