Repository navigation
Conversation
g_thread_join() is the deallocator of g_thread_new() and g_thread_try_new(), but its function entry also had <leak-ignore/>, so the join was ignored and every joined thread was reported as Memory leak: thread Drop <leak-ignore/> and describe the arguments of g_thread_join(), g_thread_new() and g_thread_try_new(), which had no function entry.
Contributor
Author
|
The cygwin failure is in Set up Cygwin, before the build; could you re-run it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I don't have a Trac account, so there is no ticket for this; the details are below. Feel free to create one and I'll add it to the title.
g_thread_join()releases the thread, and gtk.cfg already lists it as a<dealloc>ofg_thread_new()andg_thread_try_new(). Its<function>entry also had<leak-ignore/>, so the call was ignored and every joined thread was reported as leaked.<leak-ignore/>is removed fromg_thread_join.g_thread_join,g_thread_newandg_thread_try_newget their argument and return value configuration; the last two had no<function>entry.Tests:
test/cfg/gtk.ccovers a joinedg_thread_new()thread, a joinedg_thread_try_new()thread, and a thread that is never joined (still reported asmemleak). The false positive shows without the change;cfg/gtk.cfgvalidates againstcppcheck-cfg.rng.