2017-12-09 10:38:58 +08:00
|
|
|
// RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
|
Adding Msan support to FreeBSD
Summary:
Enabling the memory sanitizer support for FreeBSD, most of unit tests are compatible.
- Adding fstat and stressor_r interceptors.
- Updating the struct link_map access since most likely the struct Obj_Entry had been updated since.
- Disabling few unit tests until further work is needed (or we can assume it can work in real world code).
Patch by: David CARLIER
Reviewers: vitalybuka, krytarowski
Reviewed By: vitalybuka
Subscribers: eugenis, dim, srhines, emaste, kubamracek, mgorny, fedor.sergeev, hintonda, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D43080
llvm-svn: 326644
2018-03-03 19:43:11 +08:00
|
|
|
// textdomain() is not a part of libc on FreeBSD and NetBSD.
|
2018-02-10 22:36:55 +08:00
|
|
|
// UNSUPPORTED: netbsd, freebsd
|
2013-12-02 21:43:26 +08:00
|
|
|
|
|
|
|
#include <libintl.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
const char *td = textdomain("abcd");
|
|
|
|
if (td[0] == 0) {
|
|
|
|
printf("Try read");
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|