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 in topic_name of subscription and publisher (at least) #107

Closed
wjwwood opened this issue May 9, 2017 · 7 comments
Closed

memory leak in topic_name of subscription and publisher (at least) #107

wjwwood opened this issue May 9, 2017 · 7 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@wjwwood
Copy link
Member

wjwwood commented May 9, 2017

See:

Really the whole file should be audited. Also the new can throw a C++ exception that would raise through the rmw C interface which is bad. It should either use malloc or rmw_allocate or the new rcutils_allocator_t or it should try-catch the new.

@wjwwood wjwwood added bug Something isn't working help wanted Extra attention is needed labels May 9, 2017
@allenh1
Copy link
Contributor

allenh1 commented Jun 19, 2017

@wjwwood I'll take care of this one.

@allenh1 allenh1 self-assigned this Jun 19, 2017
@allenh1
Copy link
Contributor

allenh1 commented Jun 19, 2017

There's also another problem here, in that valgrind usually complains about a mismatched free() / delete / delete[] somewhere in this file (noticed this while working on the python leaking).

@wjwwood
Copy link
Member Author

wjwwood commented Jun 19, 2017

There is almost certainly other issues in that file. It wasn't written by us originally, and so hasn't been subject to code review for much of its life. This is issue was about a very particular issue. I don't think you can use valgrind pass/fail as an indicator of whether or not this is fixed.

@allenh1
Copy link
Contributor

allenh1 commented Jun 19, 2017

I also see a lot of inconsistency wrt the use of nullptr.

@mikaelarguedas
Copy link
Member

Yes as @wjwwood mentioned this file has not been written by us, has a lot of inconsistency and issues and should be both audited and refactored. This is out of the scope of this particular issue as pointed out in the previous comment.

@allenh1 allenh1 added ready Work is about to start (Kanban column) in progress Actively being worked on (Kanban column) and removed ready Work is about to start (Kanban column) labels Jun 19, 2017
@allenh1 allenh1 added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Jun 19, 2017
@mikaelarguedas
Copy link
Member

mikaelarguedas commented Jun 20, 2017

putting this back in ready with a more generic title to reflect the first comment:

Really the whole file should be audited

EDIT: Actually I'll open another ticket tracking the high level issue

@mikaelarguedas
Copy link
Member

closed in favor of #122

@mikaelarguedas mikaelarguedas removed the in review Waiting for review (Kanban column) label Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants