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

fix a few asan reported issues and a coredump on exit #6285

Merged
merged 3 commits into from
Jun 2, 2024

Conversation

gulafaran
Copy link
Contributor

the wl_event_resource was running upon destruction of the compositor causing a null pointer segfault in onX11Event so ensure the event is removed upon destruction, also free the memory allocated by xcb_errors_context_new and finally call xcb_disconnect on the connection to free the fd and its memory.

also free the eventsources in hyprctl and eventloopmanager.

the wl_event_resource was running upon destruction of the compositor
causing a null pointer segfault in onX11Event so ensure the event is
removed upon destruction, also free the memory allocated by
xcb_errors_context_new and finally call xcb_disconnect on the connection
to free the fd and its memory.
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest lgtm

src/debug/HyprCtl.hpp Outdated Show resolved Hide resolved
add a destructor and properly free the fd on destruction
properly free the wl_event_source upon destruction.
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@vaxerski vaxerski merged commit 1cc35cf into hyprwm:main Jun 2, 2024
10 checks passed
@obivan
Copy link
Contributor

obivan commented Jun 3, 2024

This one is merged, but I don't see any related commits in main. Pardon my ignorance, but... how so?

@MightyPlaza
Copy link
Contributor

This one is merged, but I don't see any related commits in main. Pardon my ignorance, but... how so?

possibly #6154 (comment)

@vaxerski
Copy link
Member

vaxerski commented Jun 3, 2024

thanks for spotting, I accidentally nuked a bit of history yesterday and missed restoring this one. Will do later today.

vaxerski pushed a commit that referenced this pull request Jun 3, 2024
* xwayland: add destructor to CXWM and free resource

the wl_event_resource was running upon destruction of the compositor
causing a null pointer segfault in onX11Event so ensure the event is
removed upon destruction, also free the memory allocated by
xcb_errors_context_new and finally call xcb_disconnect on the connection
to free the fd and its memory.

* hyprctl: dont leak the fd on destruction

add a destructor and properly free the fd on destruction

* eventloop: add destructor and free event source

properly free the wl_event_source upon destruction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants