[PATCH] D44049: OpenBSD UBsan support enabling SANITIZER_OPENBSD widely

David CARLIER via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 16:20:25 PST 2018


devnexen added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_posix_libcdep.cc:125
+#if SANITIZER_OPENBSD
+#define RLIMIT_AS RLIMIT_DATA
+#endif
----------------
vitalybuka wrote:
> Maybe make it more generic and avoid new definition?
> 
> 
> ```
> #if defined(RLIMIT_AS)
>   int rlimit =  RLIMIT_AS;
> #else
>   int rlimit = RLIMIT_DATA;
> #endif
>   rlim_t as_size = getlim(rlimit);
> ```
I could but RLIMIT_AS is still used in the function below.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D44049





More information about the llvm-commits mailing list