This is a very simple test that calls wsclen. There are currently no other HWASan tests that call wsclen, which is why the wcslen interceptor issue (triggered by https://reviews.llvm.org/D150708 and fixed in https://reviews.llvm.org/D150909) was only detected by stage2/hwasan check on the buildbots. With this test, the issue would have been caught by stage1 check-sanitizer, with a more obvious diagnosis.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D151000
--- /dev/null
+// RUN: %clang %s -O0 -o %t && %run %t 2>&1
+
+#include <assert.h>
+#include <wchar.h>
+
+int main(int argc, char **argv) {
+ wchar_t x[] = L"Hello World!";
+ assert(wcslen(x) == 12);
+ return 0;
+}