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) ...".
Details
Details
- Reviewers
vitalybuka melver - Commits
- rG326b0054fd32: sanitizer_common: use 0 for empty stack id
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I don't know exactly, this code is not particularly maintained.
One option is that findEdge always assigns something to stk_from/stk_to so that the initial values are never used.
I found it when I experimented with introduction of strong typedefs for some types including stack IDs. It did not forgive such sloppiness as assigning random values to these types.