Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syz-fuzzer, executor: Add support for blacklisting data race frames #1472

Merged
merged 1 commit into from
Oct 22, 2019

Conversation

melver
Copy link
Collaborator

@melver melver commented Oct 22, 2019

This adds support to add frames that have already been in data races, to
the KCSAN report blacklist.

@dvyukov
Copy link
Collaborator

dvyukov commented Oct 22, 2019

lint says:

syz-fuzzer/fuzzer.go:105:1: cyclomatic complexity 25 of func `main` is high (> 24) (gocyclo)

if r.CheckResult.Features[host.FeatureLeakChecking].Enabled {
gateCallback = func() { fuzzer.gateCallback(r.MemoryLeakFrames) }
}
fuzzer.gate = ipc.NewGate(2**flagProcs, gateCallback)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the gate in all cases, even without leak checking.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean: move this back to main?

The code is still there, just in "useBugFrames". ipc.NewGate does nothing if gateCallback is nil? And it seems only if leak checking is enabled is it set to non-nil.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see, it should work then, just somewhat confusing b/c gate is not a no-op even without callback. It has major role even without leak/race checking, so seeing it being setup in useBugFrames is somewhat misleading.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved fuzzer.gate assignment.

}
fuzzer.gate = ipc.NewGate(2*flagProcs, gateCallback)

if r.CheckResult.Features[host.FeatureKCSAN].Enabled {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to check len(r.DataRaceFrames) != 0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

This adds support to add frames that have already been in data races, to
the KCSAN report blacklist.
@dvyukov
Copy link
Collaborator

dvyukov commented Oct 22, 2019

LGTM
Please merge once CI gives green light

@codecov-io
Copy link

Codecov Report

Merging #1472 into master will decrease coverage by 0.01%.
The diff coverage is 22.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1472      +/-   ##
==========================================
- Coverage   56.37%   56.36%   -0.02%     
==========================================
  Files         140      140              
  Lines       26147    26162      +15     
==========================================
+ Hits        14741    14745       +4     
- Misses      10701    10712      +11     
  Partials      705      705
Impacted Files Coverage Δ
syz-fuzzer/fuzzer.go 8.63% <0%> (-0.33%) ⬇️
pkg/report/report.go 89.81% <100%> (+0.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ee855e...578e0a3. Read the comment docs.

@melver melver merged commit 5681358 into google:master Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants