sanitizer_common: use 0 for empty stack id

We use 0 for empty stack id from stack depot.
Deadlock detector 1 is the only place that uses -1
as a special case. Use 0 because there is a number
of checks of the form "if (stack id) ...".

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D105776
This commit is contained in:
Dmitry Vyukov 2021-07-11 14:46:09 +02:00
parent c305557acd
commit 326b0054fd
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ void DD::ReportDeadlock(DDCallback *cb, DDMutex *m) {
DDMutex *m0 = (DDMutex*)dd.getData(from);
DDMutex *m1 = (DDMutex*)dd.getData(to);
u32 stk_from = -1U, stk_to = -1U;
u32 stk_from = 0, stk_to = 0;
int unique_tid = 0;
dd.findEdge(from, to, &stk_from, &stk_to, &unique_tid);
// Printf("Edge: %zd=>%zd: %u/%u T%d\n", from, to, stk_from, stk_to,