[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] a strange segmentation fault
From: |
Heng Yin |
Subject: |
[Qemu-devel] a strange segmentation fault |
Date: |
Wed, 06 Dec 2006 11:20:16 -0500 |
User-agent: |
Thunderbird 1.5.0.8 (X11/20061117) |
Hi QEMU developers,
I'm running into a strange problem when I add some my own stuff in QEMU.
If I add a function call in the following position, QEMU will crash
immediately after execution.
In target-i386/op.c:
void OPPROTO op_jnz_T0_label(void)
{
helper_test(T0); //my own function
if (T0)
GOTO_LABEL_PARAM(1);
FORCE_RET();
}
I define this function in target-i386/helper.c:
int helper_test(int t0)
{
return 100+t0;
}
I try it on the two versions: 0.8.2 and 0.8.0. The problem appears no
matter what kqemu option (-kernel-kqemu -no-kqmeu, or none) is used and
what guest os (linux or winxp) is to launch.
I got the following message from gdb:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212991808 (LWP 28612)]
0x00000001 in ?? ()
(gdb) bt
#0 0x00000001 in ?? ()
#1 0x080bac6c in cpu_x86_exec (env1=0x40)
at /home/hyin/qemu-0.8.2/cpu-exec.c:772
#2 0x08050a62 in main_loop () at /home/hyin/qemu-0.8.2/vl.c:5069
#3 0x08051fe2 in main (argc=3324, argv=0x8)
at /home/hyin/qemu-0.8.2/vl.c:6221
(gdb)
Interestingly, if I change the function helper_test to take no
arguments, the fault will be gone.
Can anybody give any hints of what may cause this fault and how to solve it?
Thanks,
Heng
- [Qemu-devel] a strange segmentation fault,
Heng Yin <=