I met a tricky bug, I let a process run:
Code: Select all
sub $4, %rsp;
repeat:
incl (%rsp);
jmp repeat;
In bochs and VMware, the values for all processes (ticks are equally allocated) are all the same, that is also my expectation.
In QEMU, the values are different, and 1 process' is 10 times than that of another.
Strange thing happened when I memcpy(rsp-PAGE_SIZE, rsp-PAGE_SIZE, PAGE_SIZE), it should not change anything according to my memcpy implement. But now, QEMU display the exactly same value.
I got really confused (and I am going to be crazy) about the phenomenon I saw.
I think maybe there is a bug about vaddr translation or cache in QEMU?