public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Zach Carter <z.carter@f5.com>
To: linux-btrfs@vger.kernel.org
Subject: BUG: btrfsck segfaults on regular file
Date: Mon, 19 Jan 2009 10:16:34 -0800	[thread overview]
Message-ID: <200901191016.34941.z.carter@f5.com> (raw)

We should probably just get an informative error message here, not a segfault.

Also, I got the same segfault when running "btrfsck -h" (it was looking for a 
file named "-h".  I'd be happy to contribute a getopts patch, if that is 
desired.

-Zach

[zcarter@nudj btrfs-progs-unstable]$ touch foo
[zcarter@nudj btrfs-progs-unstable]$ ./btrfsck ./foo
No valid Btrfs found on ./foo
Segmentation fault
[zcarter@nudj btrfs-progs-unstable]$ gdb ./btrfsck
GNU gdb Fedora (6.8-29.fc10)
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-redhat-linux-gnu"...
(gdb) run ./foo
Starting program: /opt/src/btrfs-progs-unstable/btrfsck ./foo
No valid Btrfs found on ./foo

Program received signal SIGSEGV, Segmentation fault.
check_extents (root=0x0) at btrfsck.c:2006
2006		add_root_to_pending(root->fs_info->tree_root->node, bits, bits_nr,
(gdb) 


             reply	other threads:[~2009-01-19 18:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-19 18:16 Zach Carter [this message]
2009-01-21  2:10 ` BUG: btrfsck segfaults on regular file Shen Feng
  -- strict thread matches above, loose matches on Subject: below --
2009-04-29 21:19 nightrow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200901191016.34941.z.carter@f5.com \
    --to=z.carter@f5.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox