|
From: Josef W. <Jos...@gm...> - 2012-08-06 21:56:34
|
Am 06.08.2012 22:36, schrieb Philippe Waroquiers: > For sure, the patch is not ready yet :). Hmm.. I think I know the problem. I was able to reproduce the failure for none/tests/pending (amd64), and it always fails in the same place, and you can compare with the run using unwindregs-at-mem-access: Both get signal 11 at some point because of a stack underrun. The version using unwindregs-at-mem-access goes on and growths the stack, while the version using allregs-at-sb-exits gets killed by the signal. I assume because the guest state was not up-to-date, Valgrind's SEGFAULT handler was not able to detect that this was a stack underrun. So ensuring the guest stack register is up-to-date before a memory write is generally important for Valgrind being able to handle stack underruns. We still could get rid of register updates for RBP/RIP. A completely different approach to restore guest register state when interrupted within execution of a SB would be to store meta information about the register allocation done at translation time, and reconstruct the state from that when a signal is raised. But I do not think it's worth doing that. Josef |