[Sanitizer] Enable vis api on FreeBSD

Reviewers: krytarowski

Reviewed By: krytarowski

Differential Revision: https://reviews.llvm.org/D55923

llvm-svn: 349762
This commit is contained in:
David Carlier 2018-12-20 14:25:43 +00:00
parent 380bece7af
commit 22594ae962
4 changed files with 8 additions and 1 deletions

View File

@ -543,6 +543,6 @@
#define SANITIZER_INTERCEPT_MD2 SI_NETBSD
#define SANITIZER_INTERCEPT_SHA2 SI_NETBSD
#define SANITIZER_INTERCEPT_CDB SI_NETBSD
#define SANITIZER_INTERCEPT_VIS SI_NETBSD
#define SANITIZER_INTERCEPT_VIS (SI_NETBSD || SI_FREEBSD)
#endif // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H

View File

@ -65,6 +65,7 @@
#include <term.h>
#include <utmpx.h>
#include <wchar.h>
#include <vis.h>
#define _KERNEL // to declare 'shminfo' structure
# include <sys/shm.h>
@ -338,6 +339,8 @@ namespace __sanitizer {
const int si_SEGV_MAPERR = SEGV_MAPERR;
const int si_SEGV_ACCERR = SEGV_ACCERR;
const int unvis_valid = UNVIS_VALID;
const int unvis_validpush = UNVIS_VALIDPUSH;
} // namespace __sanitizer
using namespace __sanitizer;

View File

@ -62,6 +62,8 @@ namespace __sanitizer {
extern unsigned struct_rlimit_sz;
extern unsigned struct_utimbuf_sz;
extern unsigned struct_timespec_sz;
extern const int unvis_valid;
extern const int unvis_validpush;
struct __sanitizer_iocb {
u64 aio_data;

View File

@ -1,4 +1,6 @@
// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
//
// UNSUPPORTED: linux, solaris, darwin
#include <ctype.h>
#include <err.h>