sanitizer_common: add test that calls wcslen
authorThurston Dang <thurston@google.com>
Fri, 19 May 2023 21:32:54 +0000 (21:32 +0000)
committerThurston Dang <thurston@google.com>
Wed, 24 May 2023 19:30:05 +0000 (19:30 +0000)
commit8a8c2b2ea54bd0ab13a0b9cde32109542836a46b
tree518b5c0dc3fccb0377f188c404124c6b7b9a978a
parentf0687b47a0ce82da07127fee4fe6af801df54ca6
sanitizer_common: add test that calls wcslen

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
compiler-rt/test/sanitizer_common/TestCases/wcslen_test.c [new file with mode: 0644]