| 108 | } |
| 109 | |
| 110 | static void free_items(void* p) { |
| 111 | if (p != NULL) { |
| 112 | uintptr_t* q = (uintptr_t*)p; |
| 113 | uintptr_t items = (q[0] ^ cookie); |
| 114 | for (uintptr_t i = 0; i < items; i++) { |
| 115 | if ((q[i] ^ cookie) != items - i) { |
| 116 | fprintf(stderr, "memory corruption at block %p at %zu\n", p, i); |
| 117 | abort(); |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | custom_free(p); |
| 122 | } |
| 123 | |
| 124 | |
| 125 | static void stress(intptr_t tid) { |
no outgoing calls
no test coverage detected