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

leak detection? #292

Open
dvyukov opened this issue Jun 26, 2020 · 0 comments
Open

leak detection? #292

dvyukov opened this issue Jun 26, 2020 · 0 comments

Comments

@dvyukov
Copy link
Owner

dvyukov commented Jun 26, 2020

Could go-fuzz detect logical memory leaks (DoS)?

Libfuzzer uses LeakSanitizer but it has an interesting heuristic, it will do a LeakSanitizer check (very expensive) iff the test case has unbalanced malloc/free, i.e. it allocated something it did not freed.
This is not possible directly for Go (no free). But maybe it's possible to build something similar. Namely, run GC, capture MemStats, run a batch of tests, run GC, capture MemStats, if we see unbalanced malloc/free counts, try to bisect the batch and confirm leak in a single test (each repeated execution must increase the number of live objects).

The first would probably be to build a prototype outside of go-fuzz that would precisely pinpoint a logical leak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant