• Home
  • Raw
  • Download

Lines Matching +full:rw +full:- +full:p

1 // RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
21 static NOINLINE void access(volatile char *p, int sz, int rw) { in access() argument
22 if (rw) { in access()
24 case 0: __sanitizer_unaligned_store16(p, 0); break; in access()
25 case 1: __sanitizer_unaligned_store32(p, 0); break; in access()
26 case 2: __sanitizer_unaligned_store64(p, 0); break; in access()
31 case 0: __sanitizer_unaligned_load16(p); break; in access()
32 case 1: __sanitizer_unaligned_load32(p); break; in access()
33 case 2: __sanitizer_unaligned_load64(p); break; in access()
49 static NOINLINE void access3(bool main, int sz1, bool rw, volatile char *p) { in access3() argument
50 p += off; in access3()
52 access(p, sz1, true); in access3()
54 p += off2; in access3()
55 if (rw) { in access3()
56 *p = 42; in access3()
58 if (*p == 42) in access3()
66 access2(bool main, int sz1, int off2, bool rw, volatile char *obj) { in access2() argument
68 access3<off, 0>(main, sz1, rw, obj); in access2()
70 access3<off, 1>(main, sz1, rw, obj); in access2()
72 access3<off, 2>(main, sz1, rw, obj); in access2()
74 access3<off, 3>(main, sz1, rw, obj); in access2()
76 access3<off, 4>(main, sz1, rw, obj); in access2()
78 access3<off, 5>(main, sz1, rw, obj); in access2()
80 access3<off, 6>(main, sz1, rw, obj); in access2()
82 access3<off, 7>(main, sz1, rw, obj); in access2()
86 access1(bool main, int off, int sz1, int off2, bool rw, char *obj) { in access1() argument
88 access2<0>(main, sz1, off2, rw, obj); in access1()
90 access2<1>(main, sz1, off2, rw, obj); in access1()
92 access2<2>(main, sz1, off2, rw, obj); in access1()
94 access2<3>(main, sz1, off2, rw, obj); in access1()
96 access2<4>(main, sz1, off2, rw, obj); in access1()
98 access2<5>(main, sz1, off2, rw, obj); in access1()
100 access2<6>(main, sz1, off2, rw, obj); in access1()
102 access2<7>(main, sz1, off2, rw, obj); in access1()
110 for (int rw = 0; rw < 2; rw++) { in Test() local
111 // printf("thr=%d off=%d sz1=%d off2=%d rw=%d p=%p\n", in Test()
112 // main, off, sz1, off2, rw, obj); in Test()
113 access1(main, off, sz1, off2, rw, (char*)obj); in Test()
121 void *Thread(void *p) { in Thread() argument
122 (void)p; in Thread()