| 201 | |
| 202 | #ifndef STRESS |
| 203 | static void leak(intptr_t tid) { |
| 204 | uintptr_t r = rand(); |
| 205 | void* p = alloc_items(1 /*pick(&r)%128*/, &r); |
| 206 | if (chance(50, &r)) { |
| 207 | intptr_t i = (pick(&r) % TRANSFERS); |
| 208 | void* q = atomic_exchange_ptr(&transfer[i], p); |
| 209 | free_items(q); |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | static void test_leak(void) { |
| 214 | for (int n = 0; n < ITER; n++) { |
nothing calls this directly
no test coverage detected