[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / pthread_create.c
blob2d5fc6ed5951db44b51c3f68b3f58067567f555d
1 // Tests that our thread initialization hooks work properly with random_tags=1.
2 // RUN: %clang_hwasan %s -o %t
3 // RUN: %env_hwasan_opts=random_tags=1 %run %t
5 #include <pthread.h>
7 #include <sanitizer/hwasan_interface.h>
9 volatile int state;
11 void *Increment(void *arg) {
12 ++state;
13 return NULL;
16 int main() {
17 __hwasan_enable_allocator_tagging();
18 pthread_t t1;
19 pthread_create(&t1, NULL, Increment, NULL);
20 pthread_join(t1, NULL);