linux-btrace.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: linux-btrace@vger.kernel.org
Subject: blktrace segfault.
Date: Sun, 28 Oct 2007 10:53:02 +0000	[thread overview]
Message-ID: <4724673E.1090404@linux.vnet.ibm.com> (raw)

Core was generated by `blktrace -d /dev/hdc'.
Program terminated with signal 11, Segmentation fault.
#0  0xb7e4cdec in ?? ()
(gdb) where
#0  0xb7e4cdec in ?? ()
#1  0xb7dbf000 in ?? ()
#2  0x00021000 in ?? ()
#3  0xb7dee6e8 in ?? ()
#4  0x0804ecf0 in ?? ()
#5  0x00000001 in ?? ()
#6  0x6c616367 in ?? ()
#7  0xbfee3f68 in ?? ()
#8  0xb7f51300 in ?? ()
#9  0x00000168 in ?? ()
#10 0x0804ecf0 in ?? ()
#11 0x00000001 in ?? ()
#12 0xbfee3f88 in ?? ()
#13 0xbfee3f68 in ?? ()
#14 0x080499dc in close_thread (tip=0xb7f1eff4) at blktrace.c:637
Backtrace stopped: frame did not save the PC
(gdb) 


the below diff fix the same.

diff --git a/blktrace.c b/blktrace.c
index 42613a7..4f4fcde 100644
--- a/blktrace.c
+++ b/blktrace.c
@@ -1220,6 +1220,7 @@ static int start_devices(void)
 
 	size = ncpus * sizeof(struct thread_information);
 	thread_information = malloc(size * ndevs);
+	memset(thread_information, 0, size*ndevs);
 	if (!thread_information) {
 		fprintf(stderr, "Out of memory, threads (%d)\n", size * ndevs);
 		return 1;

             reply	other threads:[~2007-10-28 10:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-28 10:53 Aneesh Kumar K.V [this message]
2007-10-29 19:47 ` blktrace segfault Jens Axboe
2007-11-14  9:39 ` Jan Blunck
2007-11-14  9:45 ` Jens Axboe
2007-11-14  9:51 ` Christoph Hellwig
2007-11-14  9:53 ` Jens Axboe

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=4724673E.1090404@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-btrace@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;
as well as URLs for NNTP newsgroup(s).