tsan: keep each access's line in the finding key - #5
Merged
Merged
Conversation
Reports were deduplicated by rule, file and top symbols. Inlined frames are named by their function alone, so two different races in one file under the same name (two Drop impls, both `drop`) became one finding, the second counted as an occurrence of the first. The signature is now the rule, the top symbols and, for each access, the file and line of the frame the finding would be located at, sorted so the same race from either side is still one key. A frame without a line falls back to its file, as before. Findings merge on their primary line only within one classification, and a primary with no line merges only on its signature instead of at line 1. Signed-off-by: nimbrel <[email protected]>
Two Drop impls each race on their own counter. Inlined, both accesses are symbolised as `drop` in src/lib.rs, so only the line tells them apart. The sanitizer suite asserts one finding at each line, under ci and stress. Signed-off-by: nimbrel <[email protected]>
…ture Each Drop impl now does its racy write itself, as the fixture's two drops are both symbolised `drop` in one file. The sanitizer suite asserts its three races are reported at their own lines. Signed-off-by: nimbrel <[email protected]>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two different races in one file whose top frames share a name (for example two
Dropimpls, both inlined asdrop) were merged into one finding, so the second race disappeared as an occurrence of the first. The key wasrule|path|tops, with no line.rule|tops|anchors: for each access stack, thefile:lineof the frame the finding would be located at, sorted so the same race reported from either side stays one finding. Frames with no line fall back to the file, as before.The JSON shape is unchanged; the only difference is the findings that used to be merged away. SARIF output carries no fingerprints derived from this key.
racy/two-drops-one-file: twoDropimpls racing at different lines, previously one finding, now two, asserted underciandstress.racy/race-in-dependency-callbacksno longer needs#[inline(never)]helpers to keep its races apart.