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

Bug#229333: discover2-udeb: segfault



Package:  discover2-udeb
Version:  2.0+20031223-2
Severity: important
Tags:     d-i

When I try to use discover2 in d-i, it segfaults.  I was able to
reproduce it in a sid chroot, with a freshly built discover2.

This is the gdb outout:

(gdb) run -t -d all -e ata -e pci -e pcmcia -e scsi bridge broadband
  fixeddisk humaninput modem network optical removabledisk
Starting program:
  /usr/src/discover/discover2-2.0+20031223/buildudeb/discover/discover
  -t -d all -e ata -e pci -e pcmcia -e scsi bridge broadband fixeddisk
  humaninput modem network optical removabledisk
Intel Corp 82815 PCI Bridge
Intel Corp 82820 820 (Camino) Chipset ISA Bridge (ICH)
Intel Corp 82820 820 (Camino 2) Chipset IDE controller
Ricoh Co Ltd RL5c476 II
Ricoh Co Ltd RL5c476 II

Program received signal SIGSEGV, Segmentation fault.
0x400903ed in mallopt () from /lib/libc.so.6
(gdb) bt
#0  0x400903ed in mallopt () from /lib/libc.so.6
#1  0x4008fc18 in mallopt () from /lib/libc.so.6
#2  0x4008ee03 in malloc () from /lib/libc.so.6
#3  0x42b64394 in XML_ParserCreate_MM () from /usr/lib/libexpat.so.1
#4  0x42b642bd in XML_ParserCreate_MM () from /usr/lib/libexpat.so.1
#5  0x42b6426b in XML_ParserCreate () from /usr/lib/libexpat.so.1
#6  0x0804b036 in discover_xml_merge_device_url (dlist=0x6b726f,
    url=0x80511e8 "file:///usr/share/discover/scsi-device.xml",
    busclasses=0x7774656e, vendors=0x8050eb8, status=0x8052690)
    at ../../lib/device-xml.c:447
#7  0x0804b151 in discover_xml_get_devices (bus=SCSI, status=0x8052690)
    at ../../lib/device-xml.c:507
#8  0x0804d155 in discover_get_devices (bus=SCSI, status=0x8052690)
    at ../../lib/sysdep.c:131
#9  0x0804b8fe in discover_device_find (discover_class=0xbffffe96 "fixeddisk",
    status=0x8052690) at ../../lib/device.c:88
#10 0x0804956c in type_summary (type=0xbffffe96 "fixeddisk")
    at ../../discover/discover.c:517
#11 0x08049d92 in main (argc=8, argv=0xbffffd44)
    at ../../discover/discover.c:808
(gdb)

This is the output from valgrind:

# valgrind buildudeb/discover/discover -t -d all -e ata -e pci -e
  pcmcia -e scsi bridge broadband fixeddisk humaninput modem network
  optical removabledisk
==5834== Memcheck, a memory error detector for x86-linux.
==5834== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward.
==5834== Using valgrind-2.1.0, a program supervision framework for x86-linux.
==5834== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward.
==5834== Estimated CPU clock rate is 798 MHz
==5834== For more details, rerun with: -v
==5834==
Intel Corp 82815 PCI Bridge
Intel Corp 82820 820 (Camino) Chipset ISA Bridge (ICH)
Intel Corp 82820 820 (Camino 2) Chipset IDE controller
Ricoh Co Ltd RL5c476 II
Ricoh Co Ltd RL5c476 II
==5834== Invalid write of size 1
==5834==    at 0x40023F3A: strcpy (mac_replace_strmem.c:172)
==5834==    by 0x804B9AB: discover_device_find (device.c:122)
==5834==    by 0x804956B: type_summary (discover.c:517)
==5834==    by 0x8049D91: main (discover.c:808)
==5834==  Address 0x41DB2FB4 is 0 bytes after a block of size 28 alloc'd
==5834==    at 0x4002CBEE: malloc (vg_replace_malloc.c:160)
==5834==    by 0x804C829: _discover_xmalloc (utils.c:56)
==5834==    by 0x8049E29: _discover_create_message (core.c:87)
==5834==    by 0x804B9AB: discover_device_find (device.c:122)
Intel Corp 82559 Ethernet Adapter
==5834==
==5834== ERROR SUMMARY: 6 errors from 1 contexts (suppressed: 0 from 0)
==5834== malloc/free: in use at exit: 575907 bytes in 41264 blocks.
==5834== malloc/free: 52594 allocs, 11330 frees, 811613 bytes allocated.
==5834== For a detailed leak analysis,  rerun with: --leak-check=yes
==5834== For counts of detected errors, rerun with: -v
#

I hope this is the same bug that trigger in vmware when I test d-i.



Reply to: