-
-
pidgin/plugins/spellchk.c (Diff revision 1) I don't understand how this fixes the crash. There's nothing here that should remove a reference which doesn't explain why adding a reference fixes it.
fix crash when closing a group chat with spellchk plugin enabled
Review Request #1951 — Created Oct. 23, 2022 and submitted
Information | |
---|---|
ivanhoe | |
pidgin/pidgin | |
release-2.x.y | |
PIDGIN-17702 | |
Reviewers | |
pidgin | |
fix crash when closing a group chat with spellchk plugin enabled
Followed steps to reproduce from the bug report and neither experienced a crash or saw invalid reads related to this in valgrind.
Additionally tested that
g_signal_handlers_disconnect_matched
actually disconnects signal handlers when unloading the spellchk plugin.Also tested following test case: * connect an IRC account * enable spellchk plugin * join a chat * disable spellchk plugin * close chat window
which led to an invalid read before I added the
g_object_remove_weak_pointer
call. Now, I don't see any invalid reads related to this in valgrind anymore.
Summary |
---|
-
-
pidgin/plugins/spellchk.c (Diff revision 1) if you add
g_object_add_weak_pointer(view, &spell->view);
spell-view
will beNULL
inspellchk_free
if the view is already dead.

Change Summary:
Added weak pointer as discussed
Testing Done: |
|
||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commits: |
|
||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+20 -10) |