grub-probe is segfaulting in grub_find_root_devices_from_btrfs. Back
trace attached.
The variable "j" is being used as an array offset. However, j is never
initialized or set to any value.
Starting program: /home/floppym/src/grub/build1/grub-probe --target=device /
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x0000000000490e03 in grub_find_root_devices_from_btrfs (dir=0x6f2710 "/")
at ../branch1/util/getroot.c:489
489 ret[j] = 0;
#0 0x0000000000490e03 in grub_find_root_devices_from_btrfs (dir=0x6f2710 "/")
at ../branch1/util/getroot.c:489
fd = 9
fsi = {max_id = 1, num_devices = 1, fsid = "
Ç´\354\371\367Ex\225r\021\362'\304\314W",
reserved = {0 <repeats 124 times>}}
i = 1
j = 4206176
ret = 0x6f1080
#1 0x00000000004914c9 in grub_find_root_devices_from_mountinfo (dir=0x6f2710
"/", relroot=0x0)
at ../branch1/util/getroot.c:626
ret = 0x0
fp = 0x6f3720
buf = 0x6f3960 "32 16 8:1 / /boot rw,relatime - ext2 /dev/sda1
rw,user_xattr,acl,barrier=1\n"
len = 120
entry_len = 2
entry_max = 4
entries = 0x7ffff73c0010
parent_entry = {id = 16, major = 0, minor = 0, enc_root = '\000'
<repeats 16384 times>,
enc_path = '\000' <repeats 16384 times>, fstype = '\000' <repeats
16384 times>,
device = '\000' <repeats 16384 times>}
i = 1
#2 0x0000000000491a85 in grub_guess_root_devices (dir=0x6f2710 "/")
at ../branch1/util/getroot.c:973
os_dev = 0x0
st = {st_dev = 0, st_ino = 0, st_nlink = 0, st_mode = 4158563628,
st_uid = 32767,
st_gid = 1, __pad0 = 0, st_rdev = 0, st_size = 140737488347680,
st_blksize = 140737345964984, st_blocks = 140737488348416, st_atim =
{tv_sec = 0,
tv_nsec = 140737488347728}, st_mtim = {tv_sec = 4206176, tv_nsec =
140737488348416},
st_ctim = {tv_sec = 140737351976853, tv_nsec = 7279392}, __unused =
{100, 7284496, 0}}
dev = 0
#3 0x000000000040384a in probe (path=0x6f1320 "/", device_names=0x0, delim=10
'\n')
at ../branch1/util/grub-probe.c:333
drives_names = 0x0
curdev = 0x0
curdrive = 0x7fffffffe390
grub_path = 0x6f2710 "/"
ndev = 0
#4 0x0000000000404d51 in main (argc=3, argv=0x7fffffffe508) at
../branch1/util/grub-probe.c:878
delim = 10 '\n'
arguments = {devices = 0x6f1050, device_max = 4, ndevices = 1, dev_map
= 0x0,
zero_delim = 0}
A debugging session is active.
Inferior 1 [process 2438] will be killed.
Quit anyway? (y or n) _______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel