From: Eric Sandeen <sandeen@redhat.com>
To: Marc Dietrich <marvin24@gmx.de>
Cc: Gui Hecheng <guihc.fnst@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: init uninitialized output buf for btrfs-restore
Date: Fri, 22 Aug 2014 10:19:35 -0500 [thread overview]
Message-ID: <53F75F87.4050302@redhat.com> (raw)
In-Reply-To: <2820069.ALay9nml0k@fb07-iapwap2>
On 8/22/14, 2:35 AM, Marc Dietrich wrote:
> Hi Eric,
>
> Am Donnerstag, 21. August 2014, 13:56:49 schrieb Eric Sandeen:
>> On 8/21/14, 1:42 PM, Eric Sandeen wrote:
>>> On 8/20/14, 10:35 PM, Gui Hecheng wrote:
>>>> A memory problem reported by valgrind as follows:
>>>> === Syscall param pwrite64(buf) points to uninitialised byte(s)
>>>>
>>>> When running:
>>>> # valgrind --leak-check=yes btrfs restore /dev/sda9 /mnt/backup
>>>>
>>>> Because the output buf size is alloced with malloc, but the length of
>>>> output data is shorter than the sizeof(buf), so valgrind report
>>>> uninitialised byte(s).
>>>> We could use calloc to repalce malloc and clear this WARNING away.
>>>
>>> It clears the valgrind error away, but does it hide a real bug?
>>
>> Maybe the relevant question for Marc is - did you get decompression
>> errors during restore? if so then I guess it all makes sense, and
>> the proposed patch seems sane after all, sorry.
>
> I use lzo and yes, I got decompression errors.
Ok, ignore me then, I'm sorry - it all makes sense, Gui's patch
included. I didn't have my head on straight.
Thanks,
-Eric
next prev parent reply other threads:[~2014-08-22 15:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 3:35 [PATCH] btrfs-progs: init uninitialized output buf for btrfs-restore Gui Hecheng
2014-08-21 8:14 ` Marc Dietrich
2014-08-21 9:43 ` Gui Hecheng
2014-08-21 18:42 ` Eric Sandeen
2014-08-21 18:56 ` Eric Sandeen
2014-08-22 7:35 ` Marc Dietrich
2014-08-22 15:19 ` Eric Sandeen [this message]
2014-08-22 15:29 ` Eric Sandeen
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=53F75F87.4050302@redhat.com \
--to=sandeen@redhat.com \
--cc=guihc.fnst@cn.fujitsu.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=marvin24@gmx.de \
/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;
as well as URLs for NNTP newsgroup(s).