All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goncalo Gomes <goncalo.gomes@eu.citrix.com>
To: "Sane, Abhijeet" <Abhijeet_Sane@bmc.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: libxenserver : xen_vm_get_record() fails with SIGSEGV
Date: Tue, 29 Dec 2009 10:58:08 +0000	[thread overview]
Message-ID: <4B39E0C0.6000907@eu.citrix.com> (raw)
In-Reply-To: <CACE9D90AB02DA4F8DE4C45DB43BA3450F04D253@PHXCCRPRD03.adprod.bmc.com>

Hi,

Sane, Abhijeet wrote:
> Hi ,
>
> I am getting a SIGSEGV when calling xen_vm_get_record() function.
> Please guide me if I am doing anything wrong.
>
> <CodeSnippet>
>                         struct xen_vm_set * vm_list = NULL;
>                         //xen_vm_get_all(session,&vm_list);
>                         xen_host_get_resident_vms(session,&vm_list,host);
>                         if ( NULL == vm_list )
>                         {
>                                 print_error(session);
>                                 xen_host_free(host);
>                                 cleanup();
>                                 return 1;
>                         }
>
>                         printf("Total number of virtual machines found on Xen Server %d\n",vm_list->size);
>                         for(int i = 0 ; i < vm_list->size ; i++)
>                         {
>                                 xen_vm_record * vm_rec = NULL;
>                                 printf("Trying to get VM record\n");
> 					  //--- This is where it fails
>                                 xen_vm_get_record(session,&vm_rec ,*( vm_list->contents[i]));  
>   

You don't want to dereference that pointer, so just remove the *.

Goncalo.

      reply	other threads:[~2009-12-29 10:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-29  8:50 libxenserver : xen_vm_get_record() fails with SIGSEGV Sane, Abhijeet
2009-12-29 10:58 ` Goncalo Gomes [this message]

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=4B39E0C0.6000907@eu.citrix.com \
    --to=goncalo.gomes@eu.citrix.com \
    --cc=Abhijeet_Sane@bmc.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.