aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorMikhail R. Gadelha <mikhail@igalia.com>2023-09-07 15:22:26 -0300
committerMikhail R. Gadelha <mikhail@igalia.com>2023-09-07 16:02:32 -0300
commit9ff0a447d055a72ae4c758ef72ca2b64deefcfb7 (patch)
tree0ad92d2b6fea824fbb72731c9e50f56220114e49 /clang/lib/Frontend/CompilerInvocation.cpp
parent063524e35ac350cbf0db87e497a74f08bc88e1fc (diff)
downloadllvm-9ff0a447d055a72ae4c758ef72ca2b64deefcfb7.zip
llvm-9ff0a447d055a72ae4c758ef72ca2b64deefcfb7.tar.gz
llvm-9ff0a447d055a72ae4c758ef72ca2b64deefcfb7.tar.bz2
[libc] Fix setrlimit/getrlimit on 32-bit systems
libc uses SYS_prlimit64 (which takes a struct rlimit64) to implement setrlimt and getrlimit (which take a struct rlimit). In 64-bit bits systems this is not an issue since the members of struct rlimit64 and struct rlimit are 64 bits long, however, in 32-bit systems the members of struct rlimit are only 32 bits long, causing wrong values being passed to SYS_prlimit64. This patch changes rlim_t to be __UINT64_TYPE__ (which also changes rlimit as a side-effect), fixing the problem of mismatching types in the syscall. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D159104
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions