[asterisk-dev] [Code Review] [branch] Expand select(2) bits to allow for more than FD_SETSIZE file descriptors

Tilghman Lesher tlesher at digium.com
Wed Aug 11 09:56:02 CDT 2010



> On 2010-08-10 15:57:48, Russell Bryant wrote:
> > /branches/1.4/channels/chan_misdn.c, line 2790
> > <https://reviewboard.asterisk.org/r/824/diff/2/?file=12003#file12003line2790>
> >
> >     If we're going to touch the code, I'd rather see everything just changed to poll().  It's an easy conversion.  I know we still need to deal with this on platforms where we use a select() based poll() implementation (mac).  If we limit it to only the platforms that poll-compat is uses, does that simplify what needs to be done at all?

I needed to add another interface to complete this change, because poll() cannot modify its timeout argument to indicate the time remaining.


> On 2010-08-10 15:57:48, Russell Bryant wrote:
> > /branches/1.4/include/asterisk/select.h, lines 1-10
> > <https://reviewboard.asterisk.org/r/824/diff/2/?file=12011#file12011line1>
> >
> >     Please use the full copyright/license header

Added.


- Tilghman


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/824/#review2514
-----------------------------------------------------------


On 2010-08-11 09:54:11, Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/824/
> -----------------------------------------------------------
> 
> (Updated 2010-08-11 09:54:11)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Presently, when the number of file descriptors expands beyond FD_SETSIZE descriptors, we have troubles when those file descriptors are used with select(2).  Usually, this causes memory corruption, because the bitfields are not large enough, and parts of memory beyond the bitfield are corrupted.  This change both expands the default bitfield, as well as adding checks to ensure that memory beyond the end of bitfields are not corrupted.
> 
> 
> This addresses bug 17678.
>     https://issues.asterisk.org/view.php?id=17678
> 
> 
> Diffs
> -----
> 
>   /branches/1.4/channels/chan_alsa.c 281720 
>   /branches/1.4/channels/chan_misdn.c 281720 
>   /branches/1.4/channels/chan_oss.c 281720 
>   /branches/1.4/channels/chan_phone.c 281720 
>   /branches/1.4/configure UNKNOWN 
>   /branches/1.4/configure.ac 281720 
>   /branches/1.4/include/asterisk/autoconfig.h.in 281720 
>   /branches/1.4/include/asterisk/channel.h 281720 
>   /branches/1.4/include/asterisk/poll-compat.h 281720 
>   /branches/1.4/include/asterisk/select.h PRE-CREATION 
>   /branches/1.4/main/asterisk.c 281720 
>   /branches/1.4/main/poll.c 281720 
>   /branches/1.4/res/res_features.c 281720 
> 
> Diff: https://reviewboard.asterisk.org/r/824/diff
> 
> 
> Testing
> -------
> 
> Architectural review only.  Testing to commence, when other developers agree with the architecture of these changes.
> 
> 
> Thanks,
> 
> Tilghman
> 
>




More information about the asterisk-dev mailing list