Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 513118 - =sys-fs/btrfs-progs-3.14.1-r1 - mkfs.btrfs segfaults if long option --features is used.
Summary: =sys-fs/btrfs-progs-3.14.1-r1 - mkfs.btrfs segfaults if long option --feature...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-06-13 13:47 UTC by eroen
Modified: 2014-06-19 21:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
btrfs-progs-3.14.1-fix-mkfs-btrfs-segfault-with.patch (btrfs-progs-3.14.1-fix-mkfs-btrfs-segfault-with.patch,1.05 KB, patch)
2014-06-13 13:54 UTC, eroen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description eroen 2014-06-13 13:47:25 UTC
occam ~ # gdb mkfs.btrfs 
GNU gdb (Gentoo 7.7 p1) 7.7
Copyright (C) 2014 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-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from mkfs.btrfs...Reading symbols from /usr/lib64/debug//sbin/mkfs.btrfs.debug...done.
done.
(gdb) run --features extref /dev/sdb10
Starting program: /sbin/mkfs.btrfs --features extref /dev/sdb10
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?

Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106	../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb)


From btrfs-progs-v3.14.1/mkfs.c:
lines 1278-1281:
	while(1) {
		int c;
		c = getopt_long(ac, av, "A:b:fl:n:s:m:d:L:O:r:VMK",
				long_options, &option_index);

lines 339-355:
static struct option long_options[] = {
	{ "alloc-start", 1, NULL, 'A'},
	{ "byte-count", 1, NULL, 'b' },
	{ "force", 0, NULL, 'f' },
	{ "leafsize", 1, NULL, 'l' },
	{ "label", 1, NULL, 'L'},
	{ "metadata", 1, NULL, 'm' },
	{ "mixed", 0, NULL, 'M' },
	{ "nodesize", 1, NULL, 'n' },
	{ "sectorsize", 1, NULL, 's' },
	{ "data", 1, NULL, 'd' },
	{ "version", 0, NULL, 'V' },
	{ "rootdir", 1, NULL, 'r' },
	{ "nodiscard", 0, NULL, 'K' },
	{ "features", 0, NULL, 'O' },
	{ NULL, 0, NULL, 0}
};
Comment 1 eroen 2014-06-13 13:54:41 UTC
Created attachment 378786 [details, diff]
btrfs-progs-3.14.1-fix-mkfs-btrfs-segfault-with.patch

This issue is resolved[1] upstream, attaching the patch for easy reference.
Comment 3 Mike Gilbert gentoo-dev 2014-06-13 14:55:26 UTC
It looks like this is resolved in 3.14.2.
Comment 4 Mike Gilbert gentoo-dev 2014-06-19 21:06:32 UTC
+*btrfs-progs-3.14.2 (19 Jun 2014)
+
+  19 Jun 2014; Mike Gilbert <floppym@gentoo.org> +btrfs-progs-3.14.2.ebuild,
+  btrfs-progs-9999.ebuild:
+  Version bump.