The Colours array is apparently the source of TSAN errors. It is
unnecessary and was there to ease readability of the code. Remove it to
clean up the TSAN errors.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Passes/StandardInstrumentations.cpp | ||
---|---|---|
1272 | should this be a std::string? it looks like it's referencing a std::string in DisplayEdge::DisplayEdge() that goes out of scope |
llvm/lib/Passes/StandardInstrumentations.cpp | ||
---|---|---|
1272 | I don't think so. This is referring to the member of this class and this class is a base of DisplayEdge. The Colour value is sent in during base construction and is a StringRef. All of the colour values that are stored and passed around are StringRefs and ultimately all refer back to the strings in the 3 options for specifying the colours so they should all have values and be in scope. |
I've updated the patch with some changes to same parameter names (V -> Value, etc) and corresponding comments. The only substantive change in the update is that I changed DotCfgDiffNode::getEdge to DotCfgDiffNode::getEdgeColour and had it return a StringRef to the colour instead of the std::pair it previously did since the only use just extracted the colour from the pair (lines 1496 and 1769).
should this be a std::string? it looks like it's referencing a std::string in DisplayEdge::DisplayEdge() that goes out of scope