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

Bug#586098: libc6: simple prog in C crash on strcmp before main when linked with dbus



Package: libc6
Version: 2.11.1-3
Severity: important


After upgrading to libc6  2.11.1-3, my prog crash when linked with libdbus-1 

DBus:
ii  libdbus-1-3                               1.2.1-5+lenny1              simple interprocess messaging system
ii  libdbus-1-dev                             1.2.1-5+lenny1              simple interprocess messaging system (development headers)


Example with a.c :
/* vim: set ts=2 sw=2 expandtab: */

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

int toto( char *titi ) { 
    char * member = "toto";
    
    if ( strcmp( member, "NameAcquired" ) == 0 ) {
    return 0;
    }
  return 0;
}

int main() {
  printf("Good\n\n\n");
  return 0;
}

with $ gcc a.c -o a.out -g -Wall  && ./a.out
Good

and with $ gcc a.c -o a.out -g -Wall -ldbus-1  && ./a.out 
Erreur de segmentation ( coredump )

Backtrace with gdb: $ gdb ./a.out 
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) run
Starting program: /home/murlock/perso/ks363913/linux/dbus-prog/client-server/a.out 

Program received signal SIGSEGV, Segmentation fault.
0x00000000006009c0 in strcmp@@GLIBC_2.2.5 ()
(gdb) bt
#0  0x00000000006009c0 in strcmp@@GLIBC_2.2.5 ()
#1  0x00007f3c372db671 in ?? () from /lib64/ld-linux-x86-64.so.2
#2  0x00007f3c372d3980 in ?? () from /lib64/ld-linux-x86-64.so.2
#3  0x00007f3c372e4767 in ?? () from /lib64/ld-linux-x86-64.so.2
#4  0x00007f3c372d1423 in ?? () from /lib64/ld-linux-x86-64.so.2
#5  0x00007f3c372d0af8 in ?? () from /lib64/ld-linux-x86-64.so.2
#6  0x0000000000000001 in ?? ()
#7  0x00007fff553eb569 in ?? ()
#8  0x0000000000000000 in ?? ()
(gdb)


-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (900, 'stable'), (100, 'testing'), (10, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libc6 depends on:
ii  libc-bin                      2.11.1-3   Embedded GNU C Library: Binaries
ii  libgcc1                       1:4.4.4-1  GCC support library

libc6 recommends no packages.

Versions of packages libc6 suggests:
ii  debconf [debconf-2.0]         1.5.24     Debian configuration management sy
pn  glibc-doc                     <none>     (no description available)
ii  locales                       2.11.1-3   Embedded GNU C Library: National L

-- debconf information:
* glibc/upgrade: true
  glibc/disable-screensaver:
  glibc/restart-failed:
* glibc/restart-services: gdm ssh samba openbsd-inetd exim4 cups cron



Reply to: