Stack corruption when FD is > 1024

Bug #497570 reported by Aleksander Morgado on 2009-12-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
El Jardin
Critical
Paco

Bug Description

The Connection Module uses select() to manage the timeout in sync reception, but as FD_SETSIZE=1024 by default in GNU/Linux, the fd_set array of flags can only manage up FDs numbered up to 1024. Values greater than 1024 are common in highly-loaded multi-threaded apps using Jardin.

Also, FD_SET() of a FD greater than 1024 will actually make a stack corruption, with all its consequences.

A better approach is to avoid using select() which has the limitation of FD_SETSIZE=1024, and use poll() instead.

Changed in eljardin:
assignee: nobody → Paco (manuel-arguelles)
importance: Undecided → Critical
status: New → Confirmed
Paco (manuel-arguelles) on 2009-12-16
Changed in eljardin:
status: Confirmed → Fix Committed
Changed in eljardin:
milestone: none → 2.0.2003
Changed in eljardin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers