WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] libxenserver : xen_vm_get_record() fails with SIGSEGV

To: "Sane, Abhijeet" <Abhijeet_Sane@xxxxxxx>
Subject: Re: [Xen-devel] libxenserver : xen_vm_get_record() fails with SIGSEGV
From: Goncalo Gomes <goncalo.gomes@xxxxxxxxxxxxx>
Date: Tue, 29 Dec 2009 10:58:08 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 29 Dec 2009 02:58:54 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CACE9D90AB02DA4F8DE4C45DB43BA3450F04D253@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc
References: <CACE9D90AB02DA4F8DE4C45DB43BA3450F04D253@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: goncalo.gomes@xxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)
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.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>