Skip to content

Fix aborts triggered by _FORTIFY_SOURCE #655

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

Open
1 of 2 tasks
bk138 opened this issue Mar 5, 2025 · 0 comments
Open
1 of 2 tasks

Fix aborts triggered by _FORTIFY_SOURCE #655

bk138 opened this issue Mar 5, 2025 · 0 comments

Comments

@bk138
Copy link
Member

bk138 commented Mar 5, 2025

Both Android and Flatpak build systems by default use _FORTIFY_SOURCE=2 which causes aborts when using invalid sockets in FD_SET, FD_CLR and FD_ISSET, see https://www.gnu.org/software/libc/manual/html_node/Source-Fortification.html

  • check for invalid sockets before FD_SET, FD_CLR and FD_ISSET
  • protect check and socket usage w/ mutex
@bk138 bk138 self-assigned this Mar 5, 2025
bk138 added a commit that referenced this issue Mar 5, 2025
@bk138 bk138 removed their assignment Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant