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

Prevent a FD_SET undefined behavior #427

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

Conversation

okft
Copy link

@okft okft commented Feb 11, 2023

I'm developing a program that sends e-mails using libetpan and that connects to several servers using libcurl.

It was crashing after a certain amount of time and I painfully debugged it : I was leaking curl handles, leaving open many connections.
In fact, I was hitting a runtime check (__fdelt_chk glibc function) as soon as libetpan was trying to use FD_SET with a socket descriptor above FD_SETSIZE.

This merge request is about preventing an undefined behavior that may be triggered by other users.
I'm also changing optimization level to none because debugging with "optimized out" function parameters and return values is quite challenging.

okft added 2 commits February 11, 2023 21:07
The glic library does a runtime check and abort in this case.
See __fdelt_chk.
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.

1 participant