Package: libc6
Version: 2.3.6-16
Severity: normal
Hello!
This simple program:
$ cat ctermid_broken.c
#include <stdio.h>
int main(int argc, char** argv)
{
char* s;
s = ctermid(NULL);
return 0;
}
gets SIGSEGV:
$ gcc -O0 -g -o ctermid_broken ctermid_broken.c
$ ./ctermid_broken
Segmentation fault (core dumped)
$ LD_LIBRARY_PATH=/usr/lib/debug gdb --silent ./ctermid_broken
Using host libthread_db library "/usr/lib/debug/libthread_db.so.1".
(gdb) run
Starting program: /home/pc7135/varg/tmp/ctermid_broken
Program received signal SIGSEGV, Segmentation fault.
ctermid (s=0x0) at ../sysdeps/posix/ctermid.c:35
35 ../sysdeps/posix/ctermid.c: No such file or directory.
in ../sysdeps/posix/ctermid.c
(gdb) frame 0
#0 ctermid (s=0x0) at ../sysdeps/posix/ctermid.c:35
35 in ../sysdeps/posix/ctermid.c
(gdb) bt
#0 ctermid (s=0x0) at ../sysdeps/posix/ctermid.c:35
#1 0x08048371 in main () at ctermid_broken.c:7
libc6 packages version 2.3.6-15 (and earlier) don't have such a bug
(feature?).
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.4.32-grsec-acl-hf32.6-i686-smp
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Versions of packages libc6 depends on:
ii tzdata 2006g-2 Time Zone and Daylight Saving Time
libc6 recommends no packages.
-- no debconf information
Best regards,
Alexei.
--
All science is either physics or stamp collecting.
Attachment:
signature.asc
Description: Digital signature