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

Support basic memory leak analyzer #38

Open
tdauth opened this issue Feb 1, 2022 · 0 comments
Open

Support basic memory leak analyzer #38

tdauth opened this issue Feb 1, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@tdauth
Copy link
Owner

tdauth commented Feb 1, 2022

Even if it doesn't work that well it will be good publicity and make people use the IDE.

For example, if we have the following code:

globals
location udg_MyLocation = Location(0, 0)
endglobals

...

We can look for all globals and then for all function calls of RemoveLocation. If we can trace the variable name to the call everything is fine even if we cannot know if the call ever takes place but at least it is possible. If we cannot trace the variable name and are certain, it is a possible memory leak.

We can do the same with locals.

Tracing the variables might be difficult since they can be passed to functions and other variables and read somewhere else. We have to analyze all read and write calls and overapproximate where the variable could be.

The easiest way is just to check for the variable name.

We could also allow to modify the AST with some leak checks which hook the important functions.

@tdauth tdauth added the enhancement New feature or request label Feb 1, 2022
@tdauth tdauth self-assigned this Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant