[asterisk-dev] [Code Review] Fix a crash in res_ais

Matthew Nicholson reviewboard at asterisk.org
Mon Sep 12 09:55:42 CDT 2011


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

Ship it!


Looks good, but is there some underlying bug that causes events with the wrong size?

- Matthew


On Sept. 8, 2011, 7:31 p.m., Russell Bryant wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1423/
> -----------------------------------------------------------
> 
> (Updated Sept. 8, 2011, 7:31 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This patch resolves a crash observed in a load testing environment that
> involved the use of the res_ais module.  I observed some crashes where
> the event delivery callback would get called, but the length parameter
> incidcating how much data there was to read was 0.  The code assumed
> (with good reason I would think) that if this callback got called, there
> was an event available to read.  However, if the rare case that there's
> nothing there, catch it and return instead of blowing up.
> 
> More specifically, the change always ensure that the size of the received
> event in the cluster is always big enough to be a real ast_event.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/include/asterisk/event.h 335012 
>   /branches/1.8/main/event.c 335012 
>   /branches/1.8/res/ais/evt.c 335012 
> 
> Diff: https://reviewboard.asterisk.org/r/1423/diff
> 
> 
> Testing
> -------
> 
> I ran about 120,000 calls through a couple of systems that had this patch.
> 
> 
> Thanks,
> 
> Russell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110912/035be028/attachment.htm>


More information about the asterisk-dev mailing list