[compiler-rt] r217308 - Do not assume RLIM_INFINITY is always (rlim_t)-1in sanitizers code
Viktor Kutuzov
vkutuzov at accesssoftek.com
Sat Sep 6 00:52:51 PDT 2014
Author: vkutuzov
Date: Sat Sep 6 02:52:51 2014
New Revision: 217308
URL: http://llvm.org/viewvc/llvm-project?rev=217308&view=rev
Log:
Do not assume RLIM_INFINITY is always (rlim_t)-1in sanitizers code
Differential Revision: http://reviews.llvm.org/D5212
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc?rev=217308&r1=217307&r2=217308&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc Sat Sep 6 02:52:51 2014
@@ -69,7 +69,7 @@ void DisableCoreDumperIfNecessary() {
bool StackSizeIsUnlimited() {
rlim_t stack_size = getlim(RLIMIT_STACK);
- return (stack_size == (rlim_t)-1);
+ return (stack_size == RLIM_INFINITY);
}
void SetStackSizeLimitInBytes(uptr limit) {
@@ -79,11 +79,11 @@ void SetStackSizeLimitInBytes(uptr limit
bool AddressSpaceIsUnlimited() {
rlim_t as_size = getlim(RLIMIT_AS);
- return (as_size == (rlim_t)-1);
+ return (as_size == RLIM_INFINITY);
}
void SetAddressSpaceUnlimited() {
- setlim(RLIMIT_AS, -1);
+ setlim(RLIMIT_AS, RLIM_INFINITY);
CHECK(AddressSpaceIsUnlimited());
}
More information about the llvm-commits
mailing list