Skip to content

Fix memory leaks with fail safe#2805

Closed
fujiwarat wants to merge 4 commits intoibus:mainfrom
fujiwarat:ci3
Closed

Fix memory leaks with fail safe#2805
fujiwarat wants to merge 4 commits intoibus:mainfrom
fujiwarat:ci3

Conversation

@fujiwarat
Copy link
Member

Since the changes are critical in the RC phase, the milestone will be 1.5.34.

@fujiwarat fujiwarat self-assigned this Sep 27, 2025
@fujiwarat fujiwarat added this to the 1.5.34 milestone Sep 27, 2025
fujiwarat added a commit to fujiwarat/ibus that referenced this pull request Oct 6, 2025
Add `G_GNUC_UNUSED` flag for the GCC warnings.

BUG=ibus#2805
fujiwarat added a commit to fujiwarat/ibus that referenced this pull request Oct 6, 2025
Wish to run ibus-daemon after run ibus-ui-gtk3 for the debug purpose.

BUG=ibus#2805
fujiwarat added a commit to fujiwarat/ibus that referenced this pull request Oct 6, 2025
- When malloc() is failed, the pointer should not be deallocated
  and also other allocated memory pointers should be freed in FrameMgr.c.
- The `XIM_STRFUNC` macro implemented in XimProto.h.
- GCC `-Wanalyzer-malloc-leak` flag does not have to warn the reallocation
  since the `address` pointer is not changed and `address->imvalue_mask`
  should work in i18nMethod.c
- Seems GCC does not understand `if (!p->value)` and replace it with a
  wrapper variable in i18nMethod.c
- Fix exit() from within signal handler by CWE-479 and
  `-Wanalyzer-unsafe-call-within-signal-handler` in client/x11/main.c

BUG=ibus#2805
fujiwarat added a commit to fujiwarat/ibus that referenced this pull request Oct 6, 2025
Fix leaks of GOptionContext in bus/main.c

BUG=ibus#2805
fujiwarat added a commit to fujiwarat/ibus that referenced this pull request Oct 13, 2025
Fix leaks of GOptionContext in bus/main.c
Fix leaks of IBusEngineDesc when IME is switched in
client/wayland/ibuswaylandim.c

BUG=ibus#2805
@fujiwarat fujiwarat force-pushed the ci3 branch 2 times, most recently from ec9cc4c to 50ba621 Compare October 14, 2025 00:22
fujiwarat added a commit to fujiwarat/ibus that referenced this pull request Oct 14, 2025
- Fix leaks of GOptionContext in bus/main.c
- Fix leaks of IBusEngineDesc when IME is switched in
  client/wayland/ibuswaylandim.c
- Fix leaks of IBusTextClass:copy(), which is used in
  Emojier:get_one_dimension_lookup_table(), in src/ibustext.c
- Fix leak of IBusExtensionEvent with commit-text signal and clicking close
  button since it's not floating in ui/gtk3/panelbinding.vala

Fixes: ibus@a800957
BUG=ibus#2805
Add `G_GNUC_UNUSED` flag for the GCC warnings.

BUG=ibus#2805
Wish to run ibus-daemon after run ibus-ui-gtk3 for the debug purpose.

BUG=ibus#2805
fujiwarat added a commit to fujiwarat/ibus that referenced this pull request Nov 26, 2025
- When malloc() is failed, the pointer should not be deallocated
  and also other allocated memory pointers should be freed in FrameMgr.c.
- The `XIM_STRFUNC` macro implemented in XimProto.h.
- GCC `-Wanalyzer-malloc-leak` flag does not have to warn the reallocation
  since the `address` pointer is not changed and `address->imvalue_mask`
  should work in i18nMethod.c
- Seems GCC does not understand `if (!p->value)` and replace it with a
  wrapper variable in i18nMethod.c
- Fix exit() from within signal handler by CWE-479 and
  `-Wanalyzer-unsafe-call-within-signal-handler` in client/x11/main.c

BUG=ibus#2805
fujiwarat added a commit to fujiwarat/ibus that referenced this pull request Nov 26, 2025
- Fix leaks of GOptionContext in bus/main.c
- Fix leaks of IBusEngineDesc when IME is switched in
  client/wayland/ibuswaylandim.c
- Fix leaks of IBusTextClass:copy(), which is used in
  Emojier:get_one_dimension_lookup_table(), in src/ibustext.c
- Fix leak of IBusExtensionEvent with commit-text signal and clicking close
  button since it's not floating in ui/gtk3/panelbinding.vala

Fixes: ibus@a800957
BUG=ibus#2805
- When malloc() is failed, the pointer should not be deallocated
  and also other allocated memory pointers should be freed in FrameMgr.c.
- The `XIM_STRFUNC` macro implemented in XimProto.h.
- GCC `-Wanalyzer-malloc-leak` flag does not have to warn the reallocation
  since the `address` pointer is not changed and `address->imvalue_mask`
  should work in i18nMethod.c
- Seems GCC does not understand `if (!p->value)` and replace it with a
  wrapper variable in i18nMethod.c
- Fix exit() from within signal handler by CWE-479 and
  `-Wanalyzer-unsafe-call-within-signal-handler` in client/x11/main.c

BUG=ibus#2805
- Fix leaks of GOptionContext in bus/main.c
- Fix leaks of IBusEngineDesc when IME is switched in
  client/wayland/ibuswaylandim.c
- Fix leaks of IBusTextClass:copy(), which is used in
  Emojier:get_one_dimension_lookup_table(), in src/ibustext.c
- Fix leak of IBusExtensionEvent with commit-text signal and clicking close
  button since it's not floating in ui/gtk3/panelbinding.vala

Fixes: ibus@a800957
BUG=ibus#2805
fujiwarat added a commit that referenced this pull request Dec 9, 2025
Add `G_GNUC_UNUSED` flag for the GCC warnings.

BUG=#2805
fujiwarat added a commit that referenced this pull request Dec 9, 2025
Wish to run ibus-daemon after run ibus-ui-gtk3 for the debug purpose.

BUG=#2805
fujiwarat added a commit that referenced this pull request Dec 9, 2025
- When malloc() is failed, the pointer should not be deallocated
  and also other allocated memory pointers should be freed in FrameMgr.c.
- The `XIM_STRFUNC` macro implemented in XimProto.h.
- GCC `-Wanalyzer-malloc-leak` flag does not have to warn the reallocation
  since the `address` pointer is not changed and `address->imvalue_mask`
  should work in i18nMethod.c
- Seems GCC does not understand `if (!p->value)` and replace it with a
  wrapper variable in i18nMethod.c
- Fix exit() from within signal handler by CWE-479 and
  `-Wanalyzer-unsafe-call-within-signal-handler` in client/x11/main.c

BUG=#2805
fujiwarat added a commit that referenced this pull request Dec 9, 2025
- Fix leaks of GOptionContext in bus/main.c
- Fix leaks of IBusEngineDesc when IME is switched in
  client/wayland/ibuswaylandim.c
- Fix leaks of IBusTextClass:copy(), which is used in
  Emojier:get_one_dimension_lookup_table(), in src/ibustext.c
- Fix leak of IBusExtensionEvent with commit-text signal and clicking close
  button since it's not floating in ui/gtk3/panelbinding.vala

Fixes: a800957
BUG=#2805
@fujiwarat fujiwarat closed this Dec 9, 2025
@fujiwarat fujiwarat deleted the ci3 branch December 9, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant