Bug#329785: libc6: dirname() fails with sig11 on amd64 (x86_64)
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
Reply to: