diff options
| author | Viktor Kutuzov <vkutuzov@accesssoftek.com> | 2014-09-06 07:52:51 +0000 | 
|---|---|---|
| committer | Viktor Kutuzov <vkutuzov@accesssoftek.com> | 2014-09-06 07:52:51 +0000 | 
| commit | 1827415be49da39124bace6b2c7e2251734e52fd (patch) | |
| tree | 2231d2e61ed61b9796297f74e37e06ba12a61086 /compiler-rt/lib | |
| parent | dcb98e5dcc05bee301b0167039c09c6ff072e8e3 (diff) | |
| download | bcm5719-llvm-1827415be49da39124bace6b2c7e2251734e52fd.tar.gz bcm5719-llvm-1827415be49da39124bace6b2c7e2251734e52fd.zip  | |
Do not assume RLIM_INFINITY is always (rlim_t)-1in sanitizers code
Differential Revision: http://reviews.llvm.org/D5212
llvm-svn: 217308
Diffstat (limited to 'compiler-rt/lib')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc index b5b24634ffe..be613fe5600 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc @@ -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());  }  | 

