Re: [XenAccess-devel] Segmentation fault when calling the same function twice
Status: Beta
Brought to you by:
bdpayne
From: Bryan D. P. <br...@th...> - 2006-08-24 12:44:13
|
Looks like you have uncovered a bug :-) I looked at it this morning and found the cause. I wasn't doing proper cleanup on the cache when xa_destroy was called. The fix is already in the repository, in case you'd like to try it out. Thanks for reporting this... -bryan On Aug 24, 2006, at 7:12 AM, Daniele Sgandurra wrote: > Hi! > I've tried to build a simple library, sort of a > wrapper for your examples (process-list, > process-data). It seems there are little problems when > calling two times the same function. For example, if I > modify the file process-list.c, in this way (I've > replaced the name "main" with "mainb" and created > another "main" that calls two times "mainb"): > > int mainb (int argc, char **argv) > { > xa_instance_t xai; > unsigned char *memory = NULL; > uint32_t offset, next_process, list_head; > char *name = NULL; > int pid = 0; > > ...... > } > > int main (int argc, char **argv) > { > printf("first\n"); > mainb(argc, argv); > printf("second\n"); > mainb(argc, argv); > return 0; > } > > I get a segmentation fault error: > > [examples]# ./run ./process-list 1 > first > [ 1] init > [ 2] migration/0 > [ 3] ksoftirqd/0 > [ 4] watchdog/0 > [ 5] events/0 > [ 6] khelper > [ 7] kthread > [ 8] xenwatch > [ 9] xenbus > [ 16] kblockd/0 > [ 20] khubd > [ 58] pdflush > [ 59] pdflush > [ 61] aio/0 > [ 60] kswapd0 > [ 577] kseriod > [ 657] kpsmoused > [ 660] nash-hotplug > [ 678] kjournald > [ 1098] syslogd > [ 1104] klogd > [ 1148] exim4 > [ 1154] inetd > [ 1163] sshd > [ 1180] atd > [ 1183] cron > [ 1198] login > [ 1199] getty > [ 1200] getty > [ 1201] getty > [ 1202] getty > [ 1203] getty > [ 1204] bash > [ 1218] sshd > [ 1222] sftp-server > second > ./run: line 4: 6347 Segmentation fault $@ > [examples]# > > I'm using Xenaccess 0.2 on Fedora 5, with Xen 3.0.2-2. > I 've tried to find the problem and probably it's > something with xa_access_kernel_symbol routine. > Thanks > > > > Chiacchiera con i tuoi amici in tempo reale! > http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com > > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > XenAccess-devel mailing list > Xen...@li... > https://lists.sourceforge.net/lists/listinfo/xenaccess-devel - Bryan D. Payne Graduate Student, Computer Science Georgia Tech Information Security Center http://www.bryanpayne.org |