From: Tuan Ta Date: Thu, 21 Dec 2017 16:06:10 +0000 (-0500) Subject: sim: Fix a bug in prlimit syscall in SE mode X-Git-Tag: v19.0.0.0~2403 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1f665aad2417a68039bb5aa7b0afa77343cb319;p=gem5.git sim: Fix a bug in prlimit syscall in SE mode The old_limit pointer is supposed to be the 4th argument (index 3) of the prlimit syscall. This patch sets old_limit pointer to the correct argument. Change-Id: I97808f7234cd2622cb3eb2f1e0beb7fc8cf492c1 Reviewed-on: https://gem5-review.googlesource.com/6903 Reviewed-by: Alec Roelke Maintainer: Brandon Potter --- diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index a24028f08..2ffd6d6ae 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -1705,8 +1705,7 @@ prlimitFunc(SyscallDesc *desc, int callnum, Process *process, Addr o = process->getSyscallArg(tc, index); if (o != 0) { - TypedBufferArg rlp( - process->getSyscallArg(tc, index)); + TypedBufferArg rlp(o); switch (resource) { case OS::TGT_RLIMIT_STACK: // max stack size in bytes: make up a number (8MB for now)