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

Crashfix: PART #1709

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

michaelortmann
Copy link
Member

Found by: BigBadWouf
Patch by: michaelortmann
Fixes: #1708

One-line summary:
Crashfix gotpart(): If ismember() returns 0, fallback to get_user_by_host()

Additional description (if needed):
ismember() can returns 0 while the bot has not (yet) synched the channel, like when it just joined
This bug affects eggdrop version 1.10.0, older versions are not affected

Test cases demonstrating functionality (if applicable):
Fixes the following crash:

[22:08:48] [@] :testuser!~michael@localhost PART #test666
[22:08:48] * Please report problem to https://github.com/eggheads/eggdrop/issues
[22:08:48] * Check doc/BUG-REPORT on how to do so.
[22:08:48] * Last bind (may not be related): evnt:init_server
[22:08:48] * Wrote DEBUG
[22:08:48] * SEGMENT VIOLATION -- CRASHING!
Segmentation fault (core dumped)

@BigBadWouf
Copy link

BigBadWouf commented Oct 28, 2024

Hi,

Thank you, this perfectly fix the /part crash. However it's seem produce a lot call to killmember(). Don't know if related

@michaelortmann
Copy link
Member Author

Good find. The killmember() was already called before the regression.

So now, additionally this PR avoids calling killmember() if we just checked that the parting entity is not ismember()

ismember() already checks the very channel memberlist that killmember() would search through again.

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.

SEGMENT VIOLATION on user /part
2 participants