[PATCH] D44036: OpenBSD UBsan support / common part 3
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 2 14:52:59 PST 2018
vitalybuka requested changes to this revision.
vitalybuka added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:106
+#include <sys/sysctl.h>
+extern char **environ;
+#endif
----------------
devnexen wrote:
> vitalybuka wrote:
> > Why do you need this extern?
> > Is any header for this?
> It s a system one I believe.
On linux it's
```
extern "C" char **environ;
```
so if it works for your, maybe move into unconditional part
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:319
#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
- return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path,
+ return internal_syscall_ptr(SYSCALL(newfstatat), AT_FDCWD, (uptr)path,
(uptr)buf, 0);
----------------
devnexen wrote:
> vitalybuka wrote:
> > why _ptr was added here and to other non OPENBSD parts?
> @kamil asked me for Linux since internal_syscall_ptr = internal_syscall
sgtm
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D44036
More information about the llvm-commits
mailing list