From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CeZgR-0008T7-5Q for qemu-devel@nongnu.org; Wed, 15 Dec 2004 08:59:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CeZgP-0008S5-Fp for qemu-devel@nongnu.org; Wed, 15 Dec 2004 08:59:13 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CeZgP-0008Rw-3e for qemu-devel@nongnu.org; Wed, 15 Dec 2004 08:59:13 -0500 Received: from [80.53.23.60] (helo=100tka.net) by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.34) id 1CeZVt-00052t-7C for qemu-devel@nongnu.org; Wed, 15 Dec 2004 08:48:21 -0500 Received: from tomba by 100tka.net with local (Exim 4.34) id 1CeZVT-0007Xj-2K for qemu-devel@nongnu.org; Wed, 15 Dec 2004 14:47:55 +0100 Date: Wed, 15 Dec 2004 14:47:55 +0100 Message-ID: <20041215134754.GA28410@100tka.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit From: tomba@100tka.net Subject: [Qemu-devel] get_func() hangs with gcc 3.4.2 on MinGW and WinXP host Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi. I'm trying to run quemu-cvs on WinXP SP1 host and MinGW with gcc v3.4.2, but qemu after start just opens console window and hangs. After some testing I came to conclusion that this is the offending piece of code (cpu_exec.c): #if defined(USE_CODE_COPY) (...) #endif spin_unlock(&tb_lock); } tc_ptr = tb->tc_ptr; env->current_tb = tb; /* execute the generated code */ gen_func = (void *)tc_ptr; printf("xxx: cpu-exec.c::cpu_exec() AFTER gen_func = (void *)tc_ptr\n"); #if defined(__sparc__) (...) #eise printf("xxx: cpu-exec.c::cpu_exec() BEFORE gen_func()\n"); gen_func(); printf("xxx: cpu-exec.c::cpu_exec() AFTER gen_func()\n"); #endif The result after executing is like: xxx: cpu-exec.c::cpu_exec() AFTER spin_unlock(&tb_lock) xxx: cpu-exec.c::cpu_exec() AFTER gen_func = (void *)tc_ptr xxx: cpu-exec.c::cpu_exec() BEFORE gen_func() and then qemu hangs. Debugging this in VisualC gives me: "Unhandled exception in qemu.exe: 0xC0000005: Access Violation" Another strange thing is that sometimes after compile qemu makes the whole first loop: xxx: vl.c::main_loop() AFTER for(;;) xxx: vl.c::main_loop() BEFORE ret=cpu_exec() (...) xxx: cpu-exec.c::cpu_exec() AFTER spin_unlock(&tb_lock) xxx: cpu-exec.c::cpu_exec() AFTER gen_func = (void *)tc_ptr xxx: cpu-exec.c::cpu_exec() BEFORE gen_func() xxx: cpu-exec.c::cpu_exec() AFTER gen_func() (...) xxx: vl.c::main_loop() AFTER ret=cpu_exec() xxx: vl.c::main_loop() BEFORE main_loop_wait(timeout) xxx: vl.c::main_loop() AFTER main_loop_wait(timeout) xxx: vl.c::main_loop() AFTER for(;;) xxx: vl.c::main_loop() BEFORE ret=cpu_exec() (...) xxx: cpu-exec.c::cpu_exec() AFTER spin_unlock(&tb_lock) xxx: cpu-exec.c::cpu_exec() AFTER gen_func = (void *)tc_ptr xxx: cpu-exec.c::cpu_exec() BEFORE gen_func() ->hangs Anyone have an idea what is wrong here? t. -- Tomasz Bħtor e-mail: tomba@bartek.tu.kielce.pl ICQ: 101194886 ------ ---- -- - - - - - - - - - - - -- ---- ------ "Okay, let's see if I loaded this thing right." -- last words in a RPG game