[PATCH] D44049: OpenBSD UBsan support enabling SANITIZER_OPENBSD widely
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 2 17:08:48 PST 2018
vitalybuka added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_posix_libcdep.cc:125
+#if SANITIZER_OPENBSD
+#define RLIMIT_AS RLIMIT_DATA
+#endif
----------------
devnexen wrote:
> 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.
How about defining RLIMIT_AS in "sanitizer_platform_limits_openbsd.h"
maybe guarded with #if !defined(RLIMIT_AS)
according documentation it's a bug, maybe it will be fixed
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D44049
More information about the llvm-commits
mailing list