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

Memory Leak Analysis #1127

Merged
merged 13 commits into from
Aug 16, 2023
Merged

Memory Leak Analysis #1127

merged 13 commits into from
Aug 16, 2023

Conversation

mrstanb
Copy link
Member

@mrstanb mrstanb commented Aug 4, 2023

This PR contains a first simple version of a memory leak analysis:

  • Should work for single-threaded programs provided that ana.malloc.unique_address_count is set to a value > 0
  • Currently uses a simple heuristic to warn for potential memory leaks whenever the program is multi-threaded

make test fails for test case 76/02 if one uses a comment //WARN on line 7 of this test case. The error message is:
Expected warn, but registered other
Because of this I've removed the //WARN from this test case for now

src/analyses/memLeak.ml Fixed Show resolved Hide resolved
Copy link
Member

@michael-schwarz michael-schwarz left a comment

Choose a reason for hiding this comment

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

LGTM!

@sim642 sim642 added feature sv-comp SV-COMP (analyses, results), witnesses labels Aug 9, 2023
src/analyses/memLeak.ml Outdated Show resolved Hide resolved
@sim642 sim642 added this to the v2.2.0 milestone Aug 9, 2023
@mrstanb
Copy link
Member Author

mrstanb commented Aug 9, 2023

Feel free to merge.

I'll open a new PR to update the memLeak analysis with support for quick_exit as soon as #1135 is also ready and merged.

@mrstanb
Copy link
Member Author

mrstanb commented Aug 11, 2023

I'll open a new PR to update the memLeak analysis with support for quick_exit as soon as #1135 is also ready and merged.

Actually, I think it's unnecessary to open a new PR for this. I'll just update this one with a merge commit from master

@mrstanb
Copy link
Member Author

mrstanb commented Aug 11, 2023

Merged with master after #1135 was done. Added a regression test which now also covers a memory leak with quick_exit(). make test runs through fine with it.

@michael-schwarz michael-schwarz merged commit 69ee716 into goblint:master Aug 16, 2023
9 checks passed
sim642 added a commit to sim642/opam-repository that referenced this pull request Nov 24, 2023
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature student-job sv-comp SV-COMP (analyses, results), witnesses
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants