From 969bbb9cd5bc1401df9878af4fce201d1e928387 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 11 Jan 2019 05:53:09 +0000 Subject: [Sanitizer] Intercept getusershell - If entries are properly copied (there were a bug in FreeBSD implementation in earlier version), or list properly reset. Reviewers: vitalybuka, krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56562 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@350919 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../TestCases/Posix/getusershell.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/sanitizer_common/TestCases/Posix/getusershell.cc (limited to 'test/sanitizer_common/TestCases/Posix/getusershell.cc') diff --git a/test/sanitizer_common/TestCases/Posix/getusershell.cc b/test/sanitizer_common/TestCases/Posix/getusershell.cc new file mode 100644 index 000000000..6ad1c5bd1 --- /dev/null +++ b/test/sanitizer_common/TestCases/Posix/getusershell.cc @@ -0,0 +1,21 @@ +// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s + +#include +#include +#include +#include + +int main(void) { + printf("getusershell\n"); + + setusershell(); + char *fentry = getusershell(); + + printf("First entry: '%s'\n", fentry); + + endusershell(); + + return 0; + // CHECK: getusershell + // CHECK: First entry: '{{.*}}' +} -- cgit v1.2.1 From bd3acec0513387fe9cefb5b21d9772873017538a Mon Sep 17 00:00:00 2001 From: Matt Morehouse Date: Fri, 11 Jan 2019 17:26:11 +0000 Subject: XFAIL getusershell.cc on Android. Android does not implement [set|get|end]usershell(). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@350935 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/sanitizer_common/TestCases/Posix/getusershell.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/sanitizer_common/TestCases/Posix/getusershell.cc') diff --git a/test/sanitizer_common/TestCases/Posix/getusershell.cc b/test/sanitizer_common/TestCases/Posix/getusershell.cc index 6ad1c5bd1..565442355 100644 --- a/test/sanitizer_common/TestCases/Posix/getusershell.cc +++ b/test/sanitizer_common/TestCases/Posix/getusershell.cc @@ -1,5 +1,7 @@ // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s +// XFAIL: android + #include #include #include -- cgit v1.2.1 From 01e9306349ebc1146db6801fff0643d707c2212a Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 11 Jan 2019 20:09:24 +0000 Subject: [Sanitizer] Disable getusershell interception for Android Reviewers: vitalybuka, pcc, eugenis Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D56583 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@350965 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/sanitizer_common/TestCases/Posix/getusershell.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/sanitizer_common/TestCases/Posix/getusershell.cc') diff --git a/test/sanitizer_common/TestCases/Posix/getusershell.cc b/test/sanitizer_common/TestCases/Posix/getusershell.cc index 565442355..c00d75f11 100644 --- a/test/sanitizer_common/TestCases/Posix/getusershell.cc +++ b/test/sanitizer_common/TestCases/Posix/getusershell.cc @@ -1,6 +1,6 @@ // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s -// XFAIL: android +// UNSUPPORTED: android #include #include -- cgit v1.2.1 From 69c67008ec3aa76ebbca2766c934a25cbd4cebf3 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 15 Jan 2019 11:21:33 +0000 Subject: [Sanitizer] Intercept sl_add api on FreeBSD/NetBSD Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56670 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@351189 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/sanitizer_common/TestCases/Posix/getusershell.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'test/sanitizer_common/TestCases/Posix/getusershell.cc') diff --git a/test/sanitizer_common/TestCases/Posix/getusershell.cc b/test/sanitizer_common/TestCases/Posix/getusershell.cc index c00d75f11..42ee03fff 100644 --- a/test/sanitizer_common/TestCases/Posix/getusershell.cc +++ b/test/sanitizer_common/TestCases/Posix/getusershell.cc @@ -1,4 +1,5 @@ // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s +// UNSUPPORTED: android // UNSUPPORTED: android -- cgit v1.2.1 From aa30e7a9fcd56b38ddd74910bdac7e6f4263a915 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 15 Jan 2019 13:08:20 +0000 Subject: Revert little bad rebasing. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@351191 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/sanitizer_common/TestCases/Posix/getusershell.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'test/sanitizer_common/TestCases/Posix/getusershell.cc') diff --git a/test/sanitizer_common/TestCases/Posix/getusershell.cc b/test/sanitizer_common/TestCases/Posix/getusershell.cc index 42ee03fff..c00d75f11 100644 --- a/test/sanitizer_common/TestCases/Posix/getusershell.cc +++ b/test/sanitizer_common/TestCases/Posix/getusershell.cc @@ -1,5 +1,4 @@ // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s -// UNSUPPORTED: android // UNSUPPORTED: android -- cgit v1.2.1