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>
  • Loading branch information
andreas-schwab authored and rth7680 committed Jul 15, 2023
1 parent e18ed26 commit d28b3c9
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 d28b3c9

Please sign in to comment.