Lines Matching defs:race
10 // This file is a part of ThreadSanitizer (TSan), a race detector.
95 ExpectRace *race = list->next;
96 for (; race != list; race = race->next) {
97 if (race->addr == addr && race->size == size) {
98 race->addcount++;
102 race = (ExpectRace*)internal_alloc(MBlockExpectRace, sizeof(ExpectRace));
103 race->addr = addr;
104 race->size = size;
105 race->file = f;
106 race->line = l;
107 race->desc[0] = 0;
108 race->hitcount = 0;
109 race->addcount = 1;
113 race->desc[i] = desc[i];
114 race->desc[i] = 0;
116 race->prev = list;
117 race->next = list->next;
118 race->next->prev = race;
119 list->next = race;
123 for (ExpectRace *race = list->next; race != list; race = race->next) {
124 uptr maxbegin = max(race->addr, addr);
125 uptr minend = min(race->addr + race->size, addr + size);
127 return race;
133 ExpectRace *race = FindRace(list, addr, size);
134 if (race == 0 && AlternativeAddress(addr))
135 race = FindRace(list, AlternativeAddress(addr), size);
136 if (race == 0)
138 DPrintf("Hit expected/benign race: %s addr=%zx:%d %s:%d\n",
139 race->desc, race->addr, (int)race->size, race->file, race->line);
140 race->hitcount++;
167 for (ExpectRace *race = list->next; race != list; race = race->next) {
169 if (race->*counter == 0)
171 (*hit_count) += race->*counter;
175 if (race->line == race0->line
176 && internal_strcmp(race->file, race0->file) == 0
177 && internal_strcmp(race->desc, race0->desc) == 0) {
178 race0->*counter += race->*counter;
183 matched->PushBack(*race);
219 static void ReportMissedExpectedRace(ExpectRace *race) {
221 Printf("WARNING: ThreadSanitizer: missed expected data race\n");
223 race->desc, race->addr, race->file, race->line);
312 ExpectRace *race = dyn_ann_ctx->expect.next;
313 if (race->hitcount == 0) {
315 ReportMissedExpectedRace(race);
317 race->prev->next = race->next;
318 race->next->prev = race->prev;
319 internal_free(race);
360 DPrintf("Add expected race: %s addr=%zx %s:%d\n", desc, mem, f, l);
368 DPrintf("Add benign race: %s addr=%zx %s:%d\n", desc, mem, f, l);
371 // FIXME: Turn it off later. WTF is benign race?1?? Go talk to Hans Boehm.