From c7573669080ce77c7c1eba01d383bad4f776eb20 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Fri, 28 Aug 2026 12:59:30 +0800 Subject: [PATCH] [WRAPPER] Enforce RLIMIT_AS set by the guest instead of ignoring it --- src/wrapped/wrappedlibc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 4aa964985e..ad97ccde89 100644 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -4365,8 +4365,8 @@ EXPORT int my_getrlimit64(x64emu_t* emu, uint32_t resource, struct rlimit64* rli EXPORT int my_setrlimit(x64emu_t* emu, int ressource, const struct rlimit *rlim) { - int ret = (ressource==RLIMIT_AS)?0:setrlimit(ressource, rlim); - if(ressource==RLIMIT_AS) printf_log(LOG_DEBUG, " (ignored) RLIMIT_AS, cur=0x%lx, max=0x%lx ", rlim->rlim_cur, rlim->rlim_max); + int ret = setrlimit(ressource, rlim); + if(ressource==RLIMIT_AS) printf_log(LOG_DEBUG, " RLIMIT_AS, cur=0x%lx, max=0x%lx ", rlim->rlim_cur, rlim->rlim_max); return ret; }