[PATCH] D44049: OpenBSD UBsan support enabling SANITIZER_OPENBSD widely
David CARLIER via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 3 04:20:43 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
----------------
krytarowski wrote:
> vitalybuka wrote:
> > 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
> I think this has been forgotten to add RLIMIT_AS in an OpenBSD specific header.. however the rest seems fine. Please send a new patch afterwards.
Right :-) ... doing it.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D44049
More information about the llvm-commits
mailing list