From 23a1b85087fee57642545662e1c413228149b024 Mon Sep 17 00:00:00 2001 From: happyCoder92 Date: Tue, 28 Nov 2023 14:11:08 +0100 Subject: [PATCH] Make util::gerlimit compatible with MSAN --- util.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util.cc b/util.cc index 25d5e5b..33c62f0 100644 --- a/util.cc +++ b/util.cc @@ -383,7 +383,8 @@ long setrlimit(int res, const struct rlimit64& newlim) { return util::syscall(__NR_prlimit64, 0, res, (uintptr_t)&newlim, (uintptr_t) nullptr); } -long getrlimit(int res, struct rlimit64* curlim) { +long getrlimit(int res, struct rlimit64* curlim) + *curlim = {}; return util::syscall(__NR_prlimit64, 0, res, (uintptr_t) nullptr, (uintptr_t)curlim); }