On 7/8/23 23:36, Helge Deller wrote:
On 7/8/23 19:26, Richard Henderson wrote:
On 7/6/23 12:34, Andreas Schwab wrote:
Fixes: 86f04735ac ("linux-user: Fix brk() to release pages")
Signed-off-by: Andreas Schwab <[email protected]>
---
  linux-user/syscall.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 08162cc966..e8a17377f5 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -805,7 +805,7 @@ static abi_ulong brk_page;
  void target_set_brk(abi_ulong new_brk)
  {
-    target_brk = new_brk;
+    target_brk = TARGET_PAGE_ALIGN(new_brk);
      brk_page = HOST_PAGE_ALIGN(target_brk);
  }
...
I'm curious why this error might have produced host memory clobbering, but I'm 
not going to debug that.
I don't believe that this un-alignment triggers host memory clobbering either.

See my follow-up in the other mail threadd:
"Re: [RISC-V] ERROR:../accel/tcg/cpu-exec.c:1028:cpu_exec_setjmp: assertion failed: 
(cpu == current_cpu)"

Helge

Reply via email to