Re: [Qemu-devel] qemu/linux-user main.c
On Monday 19 March 2007 21:13:12 Thiemo Seufer wrote: J. Mayer wrote: On Mon, 2007-03-19 at 12:16 +, Thiemo Seufer wrote: CVSROOT: /sources/qemu Module name: qemu Changes by: Thiemo Seufer ths 07/03/19 12:16:29 Modified files: linux-user : main.c Log message: Support -cpu selection for mips usermode emulation. Fix segfault when dispaying the -cpu list help. Could you tell more about the segfault ? It segfaulted for me (on ppc/linux) after printing the help list. exit is used at many other places without any problem and furthermore I did not experiment any crash while testing the PowerPC target with the initial patch, so ? (I'd really like to understand...) I didn't really debug it, but I noticed the other branch in the conditional uses _exit() instead of exit(). With that change, the segfault disappeared. I figure we have an atexit/on_exit call somwhere which tries to use data which isn't initialized at that point. Maybe that's related to the problem i've got (in http://lists.gnu.org/archive/html/qemu-devel/2007-03/msg00110.html ). There is some piece of code in main.c which mess around libc initialization exit and were making my qemu-i386 segfault really early. It seems it was designed to avoid a bug in some versions of glibc. I attach the simple patch I've made to avoid that. It may need adjustements since I don't know enough about libc internals on initialization to be sure that's the correct fix - I would be deeply interested in some input/comments on this problem. Pierre Palatin Index: linux-user/main.c === --- linux-user/main.c (révision 527) +++ linux-user/main.c (copie de travail) @@ -44,7 +44,7 @@ /* for recent libc, we add these dummy symbols which are not declared when generating a linked object (bug in ld ?) */ -#if (__GLIBC__ 2 || (__GLIBC__ == 2 __GLIBC_MINOR__ = 3)) !defined(CONFIG_STATIC) +#if (__GLIBC__ == 2 __GLIBC_MINOR__ == 3) !defined(CONFIG_STATIC) long __preinit_array_start[0]; long __preinit_array_end[0]; long __init_array_start[0]; ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] [PATCH] Avoid immediate segfault of qemu-i386 on x86_64 host
Hi, I've got a systematic segfault in qemu-i386 ( 0.8.2, 0.9.0 and CVS, but not 0.8.1) on my x86_64. The segfault happens in glibc (2.4) initialization phase, before main : Program received signal SIGSEGV, Segmentation fault. 0x in ?? () (gdb) bt #0 0x in ?? () #1 0x6004a06f in __libc_csu_init () #2 0x2acb8cc1dbce in __libc_start_main (main=0x60005120 main, argc=1, ubp_av=0x7fff1e3192e8, init=0x6004a010 __libc_csu_init, fini=0x2acb8cf39270 initial+16, rtld_fini=0x2acb8c799c30 _dl_fini, stack_end=0x7fff1e3192d8) at libc-start.c:190 #3 0x60004b89 in _start () Basically, it tries to call a function through a function pointer, but this pointer is NULL, hence the segfault. The problems lies in the declaration in linux-user/main.c of __init_array_start variable and friends. Simply removing them do the trick and makes qemu-i386 work nicely. I don't really know why this is here; commit tells RH9 fix - path patch and code comment refers to a probable bug in ld. So I've just changed (in the attached patch) glibc requirement for those variable declarations from glibc=2.3 to glibc == 2.3. I guess it would need additional tests on a more wide variety of hosts. Pierre Palatin Index: linux-user/main.c === --- linux-user/main.c (révision 527) +++ linux-user/main.c (copie de travail) @@ -44,7 +44,7 @@ /* for recent libc, we add these dummy symbols which are not declared when generating a linked object (bug in ld ?) */ -#if (__GLIBC__ 2 || (__GLIBC__ == 2 __GLIBC_MINOR__ = 3)) !defined(CONFIG_STATIC) +#if (__GLIBC__ == 2 __GLIBC_MINOR__ == 3) !defined(CONFIG_STATIC) long __preinit_array_start[0]; long __preinit_array_end[0]; long __init_array_start[0]; ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] VirtualBox PC virtualization released as Open Source
On Monday 15 January 2007 20:02, Oliver Gerlich wrote: Hello, as I was just reading this on german newsticker heise.de: http://www.heise.de/open/news/meldung/83680 Also on Slashdot: http://it.slashdot.org/it/07/01/15/1631234.shtml And the original news: http://www.virtualbox.org/wiki/News Anyone knows more about this? How is it in direct comparison with Qemu? For what I have seen in the sources, that's based on qemu, sligthly modified in order to be somehow modular, thus allowing them to distribute additional proprietary extensions (list at http://www.virtualbox.org/wiki/Closed-source%20features ) Pierre Palatin ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel