Skip to content

Commit 23a1b85

Browse files
authored
Make util::gerlimit compatible with MSAN
1 parent 3d9a5b2 commit 23a1b85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

util.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ long setrlimit(int res, const struct rlimit64& newlim) {
383383
return util::syscall(__NR_prlimit64, 0, res, (uintptr_t)&newlim, (uintptr_t) nullptr);
384384
}
385385

386-
long getrlimit(int res, struct rlimit64* curlim) {
386+
long getrlimit(int res, struct rlimit64* curlim)
387+
*curlim = {};
387388
return util::syscall(__NR_prlimit64, 0, res, (uintptr_t) nullptr, (uintptr_t)curlim);
388389
}
389390

0 commit comments

Comments
 (0)