Skip to content

Commit

Permalink
linux-user: Make sure initial brk(0) is page-aligned
Browse files Browse the repository at this point in the history
Fixes: 86f0473 ("linux-user: Fix brk() to release pages")
Signed-off-by: Andreas Schwab <schwab@suse.de>
Message-Id: <mvmpm55qnno.fsf@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit d28b3c9)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
andreas-schwab authored and Michael Tokarev committed Jul 31, 2023
1 parent 35720b3 commit 0167759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion linux-user/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,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);
}

Expand Down

0 comments on commit 0167759

Please sign in to comment.