Bug#593652: grub-common: Bug still present in unstable
Vincent Danjean
vdanjean at debian.org
Mon Aug 30 09:33:14 UTC 2010
Package: grub-common
Version: 1.98+20100804-4
Severity: normal
This bug is still present in unstable (1.98+20100804-4).
I rebuilt the grub-probe binary with debug information.
[
about that, I changed debian/rules before running "debian/rules binary"
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
export CFLAGS += -O2 -g
endif
=> I needed to add "export" so that the CFLAGS modification is taken into
accound. Are you sure "-O2" is used in buildd ?
]
Here is what I got:
aya:/tmp/grub2-1.98+20100804# gdb --args build/grub-common/grub-probe --target=fs /boot
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 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".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/grub2-1.98+20100804/build/grub-common/grub-probe...done.
(gdb) run
Starting program: /tmp/grub2-1.98+20100804/build/grub-common/grub-probe --target=fs /boot
Program received signal SIGSEGV, Segmentation fault.
0x000000000042576e in insert_array (name=<value optimized out>)
at ../../disk/raid.c:505
505 if (array->device[new_array->index] != NULL)
(gdb) bt
#0 0x000000000042576e in insert_array (name=<value optimized out>)
at ../../disk/raid.c:505
#1 hook (name=<value optimized out>) at ../../disk/raid.c:666
#2 0x000000000040615d in iterate_disk (disk_name=<value optimized out>)
at ../../kern/device.c:123
#3 0x0000000000402b7b in grub_util_biosdisk_iterate (hook=0x7fffffffe550)
at ../../kern/emu/hostdisk.c:206
#4 0x0000000000406206 in grub_disk_dev_iterate (hook=0x7fffffffe550)
at ../../kern/disk.c:212
#5 0x0000000000405ede in grub_device_iterate (hook=<value optimized out>)
at ../../kern/device.c:168
#6 0x000000000042761a in grub_init_all () at grub_probe_init.c:58
#7 0x0000000000402a21 in main (argc=3, argv=<value optimized out>)
at ../../util/grub-probe.c:443
(gdb) print array
$1 = (struct grub_raid_array *) 0x668150
(gdb) print array->device
$2 = {0x668080, 0x6684d0, 0x66cd40, 0x667620, 0x0 <repeats 28 times>}
(gdb) print new_array
$3 = <value optimized out>
(gdb) print new_array->index
Cannot access memory at address 0x20
(gdb) up
#1 hook (name=<value optimized out>) at ../../disk/raid.c:666
666 (! insert_array (disk, &array, start_sector, grub_raid_list->name)))
(gdb) print array
$4 = {number = 0, level = 5, layout = 2, total_devs = 4, chunk_size = 256,
disk_size = 524287488, index = 65535, uuid_len = 16, uuid = 0x66d2c0 "",
name = 0x66d2a0 "aya:aya-raid5-A", nr_devs = 0, device = {
0x0 <repeats 31 times>, 0x14e}, start_sector = {4359940, 4341993, 0,
4228828, 0, 0, 0, 0, 562949935464449, 64013806272512, 0, 0, 6715152, 0, 0,
12273716359468154880, 562949953421311, 1, 976773167, 0, 0,
140737354118930, 6496336, 140737488348288, 0, 140737354119085, 6737456,
140737349652032, 6737456, 4356882, 0, 140737349652032}, next = 0x66ce30}
(gdb) print array.index
$5 = 65535
(gdb)
This last value seems a bit big, no ?
Regards,
Vincent
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.35-trunk-amd64 (SMP w/4 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 grub-common depends on:
ii base-files 5.9 Debian base system miscellaneous f
ii dpkg 1.15.7.2 Debian package management system
ii gettext-base 0.18.1.1-1 GNU Internationalization utilities
ii install-info 4.13a.dfsg.1-5 Manage installed documentation in
ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib
ii libdevmapper1.02.1 2:1.02.48-3 The Linux Kernel Device Mapper use
ii libfreetype6 2.4.2-1 FreeType 2 font engine, shared lib
ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime
Versions of packages grub-common recommends:
ii os-prober 1.39 utility to detect other OSes on a
Versions of packages grub-common suggests:
pn grub-emu <none> (no description available)
pn multiboot-doc <none> (no description available)
ii xorriso 0.5.6.pl00-2 command line iso9660+RR manipulati
-- no debconf information
More information about the Pkg-grub-devel
mailing list